File tree 2 files changed +11
-5
lines changed
frontend/src/components/ccofApplication/group
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ function buildNewFacilityPayload(req) {
30
30
function mapFacilityObjectForBack ( data ) {
31
31
const facilityForBack = new MappableObjectForBack ( data , FacilityMappings ) . toJSON ( ) ;
32
32
33
- if ( facilityForBack . ccof_facilitystartdate ) {
34
- facilityForBack . ccof_facilitystartdate = `${ facilityForBack . ccof_facilitystartdate } -01-01` ;
35
- }
33
+ facilityForBack . ccof_facilitystartdate = facilityForBack . ccof_facilitystartdate ? `${ facilityForBack . ccof_facilitystartdate } -01-01` : null ;
36
34
if ( facilityForBack . ccof_licensestartdate ) {
37
35
facilityForBack . ccof_licensestartdate = facilityForBack . ccof_licensestartdate + 'T12:00:00-07:00' ;
38
36
}
Original file line number Diff line number Diff line change 50
50
</v-radio-group >
51
51
</div >
52
52
<AppAddressForm
53
- v-if =" model.isFacilityAddressSameAsOrgStreetAddress === false "
53
+ v-if =" showFacilityAddressForm "
54
54
:disabled =" isLocked"
55
55
:manual-entry =" model.isFacilityAddressEnteredManually"
56
56
:address =" model.facilityAddress"
80
80
<v-radio label =" Yes" :value =" true" />
81
81
<v-radio label =" No" :value =" false" />
82
82
</v-radio-group >
83
- <template v-if =" model . isFacilityContactSameAsOrgContact === false " >
83
+ <template v-if =" showFacilityContactForm " >
84
84
<v-row >
85
85
<v-col cols =" 12" md =" 6" >
86
86
<v-text-field
@@ -240,6 +240,14 @@ export default {
240
240
}
241
241
next ();
242
242
},
243
+ computed: {
244
+ showFacilityAddressForm () {
245
+ return this .model .isFacilityAddressSameAsOrgStreetAddress === false ;
246
+ },
247
+ showFacilityContactForm () {
248
+ return this .model .isFacilityContactSameAsOrgContact === false ;
249
+ },
250
+ },
243
251
methods: {
244
252
updateStreetAddress (updatedModel ) {
245
253
if (isEmpty (updatedModel)) return ;
You can’t perform that action at this time.
0 commit comments