From e6ab67942715a7402175ccd37e21d2c425ebda74 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Wed, 20 Nov 2024 15:58:14 -0500 Subject: [PATCH 1/7] A lot of ng-ifs --- .../branded/step-1/branded-checkout-step-1.tpl.html | 9 +++++++-- .../designationEditor/designationEditor.tpl.html | 7 +++++-- .../productConfigForm.component.js | 3 ++- .../productConfigForm/productConfigForm.tpl.html | 2 +- .../productConfig.modal.component.js | 3 ++- .../productConfigModal/productConfig.modal.tpl.html | 4 +++- .../components/addressForm/addressForm.component.js | 6 ++++-- .../components/addressForm/addressForm.tpl.html | 2 +- .../components/contactInfo/contactInfo.component.js | 3 ++- .../components/contactInfo/contactInfo.tpl.html | 13 +++++++------ 10 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/app/branded/step-1/branded-checkout-step-1.tpl.html b/src/app/branded/step-1/branded-checkout-step-1.tpl.html index e2f85b2e2..2b6d83e1e 100644 --- a/src/app/branded/step-1/branded-checkout-step-1.tpl.html +++ b/src/app/branded/step-1/branded-checkout-step-1.tpl.html @@ -11,7 +11,9 @@ submitted="$ctrl.submitted" on-state-change="$ctrl.onGiftConfigStateChange(state)" disable-session-restart="true" - ng-if="!$ctrl.loadingProductConfig && !$ctrl.errorLoadingProductConfig"> + ng-if="!$ctrl.loadingProductConfig && !$ctrl.errorLoadingProductConfig" + use-v3="$ctrl.useV3" + > diff --git a/src/app/designationEditor/designationEditor.tpl.html b/src/app/designationEditor/designationEditor.tpl.html index 895ec5b63..53563724d 100644 --- a/src/app/designationEditor/designationEditor.tpl.html +++ b/src/app/designationEditor/designationEditor.tpl.html @@ -45,8 +45,11 @@

Page Options - + + diff --git a/src/app/productConfig/productConfigForm/productConfigForm.component.js b/src/app/productConfig/productConfigForm/productConfigForm.component.js index e6193fe8c..6990128f1 100644 --- a/src/app/productConfig/productConfigForm/productConfigForm.component.js +++ b/src/app/productConfig/productConfigForm/productConfigForm.component.js @@ -416,6 +416,7 @@ export default angular disableSessionRestart: '@', updateQueryParam: '&', submitted: '<', - onStateChange: '&' + onStateChange: '&', + useV3: '<' } }) diff --git a/src/app/productConfig/productConfigForm/productConfigForm.tpl.html b/src/app/productConfig/productConfigForm/productConfigForm.tpl.html index 583baab35..0ae88a0be 100644 --- a/src/app/productConfig/productConfigForm/productConfigForm.tpl.html +++ b/src/app/productConfig/productConfigForm/productConfigForm.tpl.html @@ -214,7 +214,7 @@

-
+

{{'OPTIONAL'}}

diff --git a/src/app/productConfig/productConfigModal/productConfig.modal.component.js b/src/app/productConfig/productConfigModal/productConfig.modal.component.js index a57e6b904..0667c3cc5 100644 --- a/src/app/productConfig/productConfigModal/productConfig.modal.component.js +++ b/src/app/productConfig/productConfigModal/productConfig.modal.component.js @@ -136,6 +136,7 @@ export default angular bindings: { resolve: '<', close: '&', - dismiss: '&' + dismiss: '&', + useV3: '<' } }) diff --git a/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html b/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html index 31b113f9c..fdf422917 100644 --- a/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html +++ b/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html @@ -14,7 +14,9 @@ default-frequency="$ctrl.defaultFrequency" update-query-param="$ctrl.updateQueryParam(key, value)" submitted="$ctrl.submitted" - on-state-change="$ctrl.onStateChange(state)"> + on-state-change="$ctrl.onStateChange(state)" + use-v3="$ctrl.useV3" + >
diff --git a/src/common/components/addressForm/addressForm.component.js b/src/common/components/addressForm/addressForm.component.js index e3c277cf2..0ecbe02b4 100644 --- a/src/common/components/addressForm/addressForm.component.js +++ b/src/common/components/addressForm/addressForm.component.js @@ -9,9 +9,10 @@ const componentName = 'addressForm' class AddressFormController { /* @ngInject */ - constructor ($log, geographiesService) { + constructor ($scope, $log, geographiesService) { this.$log = $log this.geographiesService = geographiesService + console.log($scope) } $onInit () { @@ -69,6 +70,7 @@ export default angular address: '=', parentForm: '<', onAddressChanged: '&', - addressDisabled: '<' + addressDisabled: '<', + useV3: '<' } }) diff --git a/src/common/components/addressForm/addressForm.tpl.html b/src/common/components/addressForm/addressForm.tpl.html index 49331bcd3..9f43e830c 100644 --- a/src/common/components/addressForm/addressForm.tpl.html +++ b/src/common/components/addressForm/addressForm.tpl.html @@ -1,6 +1,6 @@
-
+
diff --git a/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html b/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html index f0b636467..31b113f9c 100644 --- a/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html +++ b/src/app/productConfig/productConfigModal/productConfig.modal.tpl.html @@ -14,8 +14,7 @@ default-frequency="$ctrl.defaultFrequency" update-query-param="$ctrl.updateQueryParam(key, value)" submitted="$ctrl.submitted" - on-state-change="$ctrl.onStateChange(state)" - > + on-state-change="$ctrl.onStateChange(state)">
diff --git a/src/common/components/contactInfo/contactInfo.component.js b/src/common/components/contactInfo/contactInfo.component.js index 334d97372..0ca566144 100644 --- a/src/common/components/contactInfo/contactInfo.component.js +++ b/src/common/components/contactInfo/contactInfo.component.js @@ -192,6 +192,6 @@ export default angular onSubmit: '&', radioStationApiUrl: '<', radioStationRadius: '<', - useV3: ' Date: Fri, 13 Dec 2024 14:17:11 -0500 Subject: [PATCH 5/7] Adds country and orginization back in for useV3. --- src/app/branded/step-1/branded-checkout-step-1.tpl.html | 4 +--- src/common/components/addressForm/addressForm.component.js | 3 +-- src/common/components/addressForm/addressForm.tpl.html | 2 +- src/common/components/contactInfo/contactInfo.tpl.html | 6 ++---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/app/branded/step-1/branded-checkout-step-1.tpl.html b/src/app/branded/step-1/branded-checkout-step-1.tpl.html index 2b6d83e1e..aa89f5f28 100644 --- a/src/app/branded/step-1/branded-checkout-step-1.tpl.html +++ b/src/app/branded/step-1/branded-checkout-step-1.tpl.html @@ -30,9 +30,7 @@

{{'YOUR_INFORMATION'}}

donor-details="$ctrl.donorDetails" radio-station-api-url="$ctrl.radioStationApiUrl" radio-station-radius="$ctrl.radioStationRadius" - use-v3="$ctrl.useV3" - > - + use-v3="$ctrl.useV3"> diff --git a/src/common/components/addressForm/addressForm.component.js b/src/common/components/addressForm/addressForm.component.js index a97e396fd..c7dd32ee2 100644 --- a/src/common/components/addressForm/addressForm.component.js +++ b/src/common/components/addressForm/addressForm.component.js @@ -9,7 +9,7 @@ const componentName = 'addressForm' class AddressFormController { /* @ngInject */ - constructor ($scope, $log, geographiesService) { + constructor ($log, geographiesService) { this.$log = $log this.geographiesService = geographiesService } @@ -70,6 +70,5 @@ export default angular parentForm: '<', onAddressChanged: '&', addressDisabled: '<', - useV3: '
-
+