wickes-css2 2.94.0-develop.6 → 2.94.0-ic-298-mega-nav.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +1 -1
- package/build/css/category-main.css +1 -1
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/emulation.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/checkout.css +1 -1
- package/build/css/pages/my-account.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_product-details-v2-critical.css +1 -1
- package/build/css/pages/page_product-details-v2.css +1 -1
- package/build/css/pages/page_shopping-cart-v2.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-critical.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/css/store-locator-main.css +1 -1
- package/build/img/placeholders/discount-sm-15.jpg +0 -0
- package/build/img/placeholders/discount-sm.png +0 -0
- package/build/js/account-members.min.js +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +30 -177
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/plp-load-more.js +0 -1
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +1 -1
- package/src/components/account-families/actions-bar.hbs +3 -6
- package/src/components/aside-nav2.hbs +1 -1
- package/src/components/calendar-time-table-v2.hbs +3 -0
- package/src/components/calendar-time-table.hbs +3 -0
- package/src/components/date-selection-v2.hbs +106 -0
- package/src/components/date-selection.hbs +59 -46
- package/src/components/delivery-selection.hbs +11 -0
- package/src/components/delivery-types-v2.hbs +17 -0
- package/src/components/delivery-types.hbs +38 -18
- package/src/components/navigation/menu-item-sub.hbs +33 -0
- package/src/components/navigation/menu-item-top.hbs +32 -0
- package/src/components/navigation/menu-item.hbs +32 -0
- package/src/components/navigation/nav-wrapper.hbs +12 -0
- package/src/components/store-details.hbs +20 -22
- package/src/components/store-preview.hbs +11 -0
- package/src/components.html +0 -1
- package/src/data/data_big-wins-stores.json +22 -0
- package/src/data/data_notification-page.json +0 -4
- package/src/data/navigation.json +854 -0
- package/src/elements/dropdown.hbs +5 -16
- package/src/elements/form-row.hbs +1 -1
- package/src/elements/input.hbs +2 -2
- package/src/img/placeholders/discount-sm-15.jpg +0 -0
- package/src/img/placeholders/discount-sm.png +0 -0
- package/src/js/components/date-selection.js +20 -6
- package/src/js/components/general/main-nav.js +23 -14
- package/src/js/components/general/switchVat.js +1 -27
- package/src/js/components/leave-event.js +5 -51
- package/src/js/emulation/big-wins.js +2 -0
- package/src/js/emulation/date-selection.js +21 -0
- package/src/js/emulation/forms.js +1 -1
- package/src/js/emulation/main-nav-local.js +6 -4
- package/src/js/page/plp-load-more.js +0 -1
- package/src/layouts/my-account.hbs +1 -1
- package/src/page_checkout_delivery-address.html +70 -0
- package/src/page_checkout_delivery-details-ASM.html +251 -0
- package/src/page_checkout_delivery-details-oos-partially.html +215 -0
- package/src/page_checkout_delivery-details-oos.html +232 -0
- package/src/page_checkout_delivery-details-v2-asm.html +3 -3
- package/src/page_checkout_delivery-details-v2-calendar-message.html +1 -1
- package/src/page_checkout_delivery-details-v2-oos.html +1 -1
- package/src/page_checkout_delivery-details-v2-wisdom-not-available.html +2 -2
- package/src/page_checkout_delivery-details-v2-wisdom.html +2 -2
- package/src/{page_checkout_rapid-delivery-details.html → page_checkout_delivery-details-v2.html} +3 -14
- package/src/page_checkout_delivery-details-with-loader-v2.html +1 -1
- package/src/page_checkout_delivery-details-with-loader.html +220 -0
- package/src/page_checkout_delivery-details.html +221 -0
- package/src/page_checkout_delivery-details_guest-new.html +1 -1
- package/src/page_checkout_delivery-details_guest.html +198 -0
- package/src/page_discount_installer.html +1 -7
- package/src/page_marketing-preferences.html +1 -7
- package/src/page_my-account.html +59 -56
- package/src/page_my-account_address-book.html +2 -8
- package/src/page_my-account_order-history.html +3 -8
- package/src/page_my-account_personal-details.html +1 -7
- package/src/page_old-navigation.html +10 -0
- package/src/page_tradePro_delivery-details.html +243 -0
- package/src/page_tradePro_discount.html +2 -8
- package/src/page_tradePro_rewards.html +1 -7
- package/src/page_wismo-order-history-loadmore.html +3 -3
- package/src/partials/breadcrumbs.hbs +8 -27
- package/src/partials/head.hbs +1 -5
- package/src/partials/header.hbs +49 -68
- package/src/partials/main-nav.hbs +15 -19
- package/src/scss/barclays-paypage-combined-minified.css +1 -1
- package/src/scss/barclays-paypage-combined.css +15 -9
- package/src/scss/components/_aside-nav2.scss +0 -18
- package/src/scss/components/_big-wins-critical.scss +1 -0
- package/src/scss/components/_big-wins.scss +8 -1
- package/src/scss/components/_date-selection-add-new-styles.scss +19 -78
- package/src/scss/components/_date-selection.scss +215 -30
- package/src/scss/components/_order-item-cc.scss +6 -0
- package/src/scss/components/checkout-payment-details-v2.scss +2 -2
- package/src/scss/emulation.scss +24 -0
- package/src/scss/helpers/_variables.scss +1 -3
- package/src/scss/pages/_my-account_new.scss +12 -1
- package/src/scss/pages/checkout-new.scss +0 -51
- package/src/scss/pages/my-account.scss +0 -1
- package/src/scss/pages/page_checkout_delivery-new.scss +1 -2
- package/src/scss/pages/page_paint-mixing-error.scss +1 -1
- package/src/scss/partials/_header.scss +0 -35
- package/src/scss/partials/_main-nav.scss +11 -6
- package/src/sitemap.html +78 -49
- package/build/css/my-account-main-v2.css +0 -1
- package/build/css/pages/my-account-v2.css +0 -1
- package/build/css/pages/page_default-store.css +0 -1
- package/build/css/pages/page_personal-details.css +0 -1
- package/build/js/default-store.min.js +0 -1
- package/build/js/my-account.min.js +0 -1
- package/build/js/page/default-store.js +0 -44
- package/build/js/page/my-account.js +0 -51
- package/build/js/page/personal-details.js +0 -286
- package/build/js/personal-details.min.js +0 -1
- package/src/components/banner-news.hbs +0 -8
- package/src/components/default-store/current-store.hbs +0 -60
- package/src/components/default-store/list-of-store.hbs +0 -39
- package/src/components/default-store/store-form.hbs +0 -29
- package/src/components/default-store/store-unavailable.hbs +0 -4
- package/src/components/my-account/active-orders/consignment-info.hbs +0 -11
- package/src/components/my-account/active-orders/header.hbs +0 -4
- package/src/components/my-account/active-orders/list-orders.hbs +0 -9
- package/src/components/my-account/active-orders/order-details.hbs +0 -18
- package/src/components/my-account/active-orders/order-header.hbs +0 -7
- package/src/components/my-account/active-orders/order.hbs +0 -20
- package/src/components/my-account/active-orders/shipment-detail.hbs +0 -13
- package/src/components/my-account/barcode.hbs +0 -17
- package/src/components/my-account/clipboard-code-card.hbs +0 -16
- package/src/components/my-account/contact-us.hbs +0 -23
- package/src/components/my-account/discount.hbs +0 -11
- package/src/components/my-account/greetings.hbs +0 -7
- package/src/components/my-account/leave-modal.hbs +0 -13
- package/src/components/my-account/menu-items.hbs +0 -25
- package/src/components/my-account/mobile-nav.hbs +0 -46
- package/src/components/my-account/personal-details-form.hbs +0 -29
- package/src/components/my-account/personal-details.hbs +0 -14
- package/src/components/my-account/user-account-actions.hbs +0 -18
- package/src/components/user-information-field.hbs +0 -4
- package/src/data/data_calendar.json +0 -149
- package/src/data/my-account/data_my-account.json +0 -469
- package/src/data/my-account/data_personal-details.json +0 -204
- package/src/data/my-account/page_default-store.json +0 -158
- package/src/js/components/leave-event-v2.js +0 -0
- package/src/js/emulation/default-store.js +0 -97
- package/src/js/emulation/personal-details-local.js +0 -73
- package/src/js/page/default-store.js +0 -44
- package/src/js/page/my-account.js +0 -51
- package/src/js/page/personal-details.js +0 -286
- package/src/layouts/my-account-v2.hbs +0 -27
- package/src/page_checkout_next-day-delivery-details.html +0 -161
- package/src/page_checkout_payment-details_with-card-loader.html +0 -56
- package/src/page_default-store-page-empty.html +0 -48
- package/src/page_default-store-page.html +0 -55
- package/src/page_my-account-installer.html +0 -93
- package/src/page_my-account-trade-pro.html +0 -91
- package/src/page_personal-details-installer.html +0 -62
- package/src/page_personal-details.html +0 -60
- package/src/scss/components/my-account/_consignment-info.scss +0 -46
- package/src/scss/components/my-account/_contacts.scss +0 -116
- package/src/scss/components/my-account/_menu.scss +0 -215
- package/src/scss/components/my-account/_mobile-nav.scss +0 -130
- package/src/scss/components/my-account/_order.scss +0 -112
- package/src/scss/components/my-account/_shipment.scss +0 -93
- package/src/scss/my-account-main-v2.scss +0 -32
- package/src/scss/pages/my-account-v2.scss +0 -570
- package/src/scss/pages/page_default-store.scss +0 -634
- package/src/scss/pages/page_personal-details.scss +0 -281
|
@@ -2067,6 +2067,7 @@ Wick.BigWinsProto = function () {
|
|
|
2067
2067
|
$defaultInfo: $('.default-store__det'),
|
|
2068
2068
|
$store: $('.store'),
|
|
2069
2069
|
$chosenItem: $('.chosen__item'),
|
|
2070
|
+
$storeAct: $('.store__act'),
|
|
2070
2071
|
$storeCount: $('.store__count'),
|
|
2071
2072
|
$stockList: $('.stock__list'),
|
|
2072
2073
|
$stockTarget: $('.stock__target'),
|
|
@@ -2082,6 +2083,7 @@ Wick.BigWinsProto = function () {
|
|
|
2082
2083
|
$findStore: $('.my-account_find-store'),
|
|
2083
2084
|
$postCodeErrorMsg: $('.stock__postcode_invalid-msg'),
|
|
2084
2085
|
$ccOrder: $('.cc-order'),
|
|
2086
|
+
storeAct: 'store__act',
|
|
2085
2087
|
storeState: 'store__state',
|
|
2086
2088
|
storeCount: '.store__count',
|
|
2087
2089
|
ccBtn: '.bw__cc-btn',
|
|
@@ -3257,6 +3259,7 @@ Wick.DateSelection = (function(){
|
|
|
3257
3259
|
cell = '.calendar__cell_cnt',
|
|
3258
3260
|
selectedCell = 'calendar__cell_selected',
|
|
3259
3261
|
isSelected = 'date-selection_selected',
|
|
3262
|
+
backToCalendar = '.delivery-time__show-calendar-link',
|
|
3260
3263
|
isDateSelected = false;
|
|
3261
3264
|
|
|
3262
3265
|
var selectTimeSlot = function(e){
|
|
@@ -3267,12 +3270,32 @@ Wick.DateSelection = (function(){
|
|
|
3267
3270
|
isDateSelected = true;
|
|
3268
3271
|
};
|
|
3269
3272
|
|
|
3273
|
+
var mobileView = function(){
|
|
3274
|
+
var isTimeSlotsVisible = 'date-selection_time-visible';
|
|
3275
|
+
|
|
3276
|
+
$self
|
|
3277
|
+
.off('.time')
|
|
3278
|
+
.removeClass(isTimeSlotsVisible)
|
|
3279
|
+
.on('click.time', cell, function(){
|
|
3280
|
+
$self.addClass(isTimeSlotsVisible);
|
|
3281
|
+
})
|
|
3282
|
+
.on('click.time', backToCalendar, function(){
|
|
3283
|
+
$self.removeClass(isTimeSlotsVisible);
|
|
3284
|
+
});
|
|
3285
|
+
};
|
|
3286
|
+
|
|
3270
3287
|
var init = function () {
|
|
3271
3288
|
if (!$self.length) {
|
|
3272
3289
|
return;
|
|
3273
3290
|
}
|
|
3274
3291
|
|
|
3275
3292
|
$self.on('click', cell, selectTimeSlot);
|
|
3293
|
+
new SimpleBar($self.find('.delivery-types__inner')[0]);
|
|
3294
|
+
|
|
3295
|
+
if (Wick.Responsive.getCurrentBreakpoint() === 'down-sm') {
|
|
3296
|
+
mobileView();
|
|
3297
|
+
}
|
|
3298
|
+
Wick.Responsive.onBreakpoint(mobileView, 'down-sm');
|
|
3276
3299
|
}
|
|
3277
3300
|
|
|
3278
3301
|
init();
|
|
@@ -3284,104 +3307,6 @@ Wick.DateSelection = (function(){
|
|
|
3284
3307
|
}
|
|
3285
3308
|
})();
|
|
3286
3309
|
|
|
3287
|
-
var Wick = Wick || {};
|
|
3288
|
-
Wick.DefaultStoreProto = {
|
|
3289
|
-
el: {
|
|
3290
|
-
searchStoreForm: '.search-store',
|
|
3291
|
-
$searchStoreWrapInput: $('.search-store__input'),
|
|
3292
|
-
searchStoreErrorClass: 'search-store__input-error',
|
|
3293
|
-
searchStoreInput: '.search-store #postcode',
|
|
3294
|
-
$searchStoreError: $('.form-row__error'),
|
|
3295
|
-
$storeUnavailableSection: $('.store-unavailable'),
|
|
3296
|
-
$listOfStoreForm: $('.list-of-store'),
|
|
3297
|
-
btnCancel: '.my-account_cancel-store',
|
|
3298
|
-
btnLocation: '.btn--location',
|
|
3299
|
-
iconLocation: '.btn--location .icon',
|
|
3300
|
-
errorIconLocation: '.btn--location .icon-error',
|
|
3301
|
-
$bigWins: $('.bw'),
|
|
3302
|
-
$bwActions: $('.bw_act'),
|
|
3303
|
-
$sDetails: $('.s-details_hide'),
|
|
3304
|
-
sDetailsHide: 's-details_hide',
|
|
3305
|
-
$storeMoreLink: $('.store__more a'),
|
|
3306
|
-
},
|
|
3307
|
-
showStoreList() {
|
|
3308
|
-
Wick.DefaultStoreProto.el.$searchStoreError.hide();
|
|
3309
|
-
Wick.DefaultStoreProto.el.$storeUnavailableSection.hide();
|
|
3310
|
-
Wick.DefaultStoreProto.el.$listOfStoreForm.show();
|
|
3311
|
-
Wick.DefaultStoreProto.el.$searchStoreWrapInput.removeClass(Wick.DefaultStoreProto.el.searchStoreErrorClass);
|
|
3312
|
-
|
|
3313
|
-
if (Wick.DefaultStoreProto.el.$bigWins.css('display') === 'none') {
|
|
3314
|
-
Wick.DefaultStoreProto.el.$bigWins.show();
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
if (Wick.DefaultStoreProto.el.$bwActions.css('display') === 'none') {
|
|
3318
|
-
Wick.DefaultStoreProto.el.$bwActions.show();
|
|
3319
|
-
}
|
|
3320
|
-
},
|
|
3321
|
-
showErrorState() {
|
|
3322
|
-
Wick.DefaultStoreProto.el.$searchStoreError.show();
|
|
3323
|
-
Wick.DefaultStoreProto.el.$storeUnavailableSection.show();
|
|
3324
|
-
Wick.DefaultStoreProto.el.$listOfStoreForm.hide();
|
|
3325
|
-
Wick.DefaultStoreProto.el.$searchStoreWrapInput.addClass(Wick.DefaultStoreProto.el.searchStoreErrorClass);
|
|
3326
|
-
},
|
|
3327
|
-
showUnavailableState() {
|
|
3328
|
-
Wick.DefaultStoreProto.el.$storeUnavailableSection.show();
|
|
3329
|
-
Wick.DefaultStoreProto.el.$listOfStoreForm.hide();
|
|
3330
|
-
|
|
3331
|
-
Wick.DefaultStoreProto.el.$sDetails.filter(function () {
|
|
3332
|
-
let isNotElementHide = !$(this).hasClass(Wick.DefaultStoreProto.el.sDetailsHide);
|
|
3333
|
-
|
|
3334
|
-
if (isNotElementHide) {
|
|
3335
|
-
$(this)
|
|
3336
|
-
.closest(Wick.DefaultStoreProto.el.$bigWins)
|
|
3337
|
-
.find(Wick.DefaultStoreProto.el.$storeMoreLink)
|
|
3338
|
-
.text('Store Info');
|
|
3339
|
-
}
|
|
3340
|
-
|
|
3341
|
-
return isNotElementHide;
|
|
3342
|
-
}).addClass(Wick.DefaultStoreProto.el.sDetailsHide);
|
|
3343
|
-
},
|
|
3344
|
-
clearSearchInput() {
|
|
3345
|
-
$(Wick.DefaultStoreProto.el.searchStoreInput).val('');
|
|
3346
|
-
Wick.DefaultStore.checkVisibilityOfClearButton();
|
|
3347
|
-
},
|
|
3348
|
-
toggleErrorStateForLocation() {
|
|
3349
|
-
const iconIsVisible = $(Wick.DefaultStoreProto.el.iconLocation).is(':visible');
|
|
3350
|
-
|
|
3351
|
-
if (iconIsVisible) {
|
|
3352
|
-
$(Wick.DefaultStoreProto.el.iconLocation).hide();
|
|
3353
|
-
$(Wick.DefaultStoreProto.el.errorIconLocation).show();
|
|
3354
|
-
} else {
|
|
3355
|
-
$(Wick.DefaultStoreProto.el.iconLocation).show();
|
|
3356
|
-
$(Wick.DefaultStoreProto.el.errorIconLocation).hide();
|
|
3357
|
-
}
|
|
3358
|
-
},
|
|
3359
|
-
init() {
|
|
3360
|
-
$(Wick.DefaultStoreProto.el.searchStoreForm).on('submit', (event) => {
|
|
3361
|
-
event.preventDefault();
|
|
3362
|
-
const value = Wick.DefaultStore.getPostCode();
|
|
3363
|
-
if (value.length) {
|
|
3364
|
-
Wick.DefaultStoreProto.showStoreList();
|
|
3365
|
-
} else {
|
|
3366
|
-
Wick.DefaultStoreProto.showErrorState();
|
|
3367
|
-
}
|
|
3368
|
-
});
|
|
3369
|
-
$(Wick.DefaultStoreProto.el.btnCancel).on('click', (event) => {
|
|
3370
|
-
event.preventDefault();
|
|
3371
|
-
Wick.DefaultStoreProto.clearSearchInput();
|
|
3372
|
-
Wick.DefaultStoreProto.showUnavailableState();
|
|
3373
|
-
})
|
|
3374
|
-
$(Wick.DefaultStoreProto.el.btnLocation).on('click', (event) => {
|
|
3375
|
-
event.preventDefault();
|
|
3376
|
-
Wick.DefaultStoreProto.toggleErrorStateForLocation();
|
|
3377
|
-
})
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
$(document).ready(function () {
|
|
3382
|
-
Wick.DefaultStoreProto.init();
|
|
3383
|
-
});
|
|
3384
|
-
|
|
3385
3310
|
const errorPoductId = '321312'
|
|
3386
3311
|
|
|
3387
3312
|
const message = {
|
|
@@ -3502,7 +3427,7 @@ Wick.Forms = (function(){
|
|
|
3502
3427
|
fieldError = '.form-row__error',
|
|
3503
3428
|
formInvalid = 'form_invalid',
|
|
3504
3429
|
rowValidationError = 'form-row_validation-error',
|
|
3505
|
-
excludedClassesForForm = ['header', 'quiz-modal__form'
|
|
3430
|
+
excludedClassesForForm = ['header', 'quiz-modal__form'],
|
|
3506
3431
|
// validationError = '<div class="form-row__error">Error message here</div>',
|
|
3507
3432
|
$forgotPassword = $('.link-forgot-password'),
|
|
3508
3433
|
scenarios = [{
|
|
@@ -5614,24 +5539,26 @@ Wick.MainNavData = (function () {
|
|
|
5614
5539
|
})();
|
|
5615
5540
|
|
|
5616
5541
|
var Wick = Wick || {};
|
|
5617
|
-
|
|
5542
|
+
|
|
5543
|
+
Wick.MainNavLocal = function(){
|
|
5618
5544
|
function init() {
|
|
5619
5545
|
var localOptions = {
|
|
5620
5546
|
local: true,
|
|
5621
5547
|
mockData: Wick.MainNavData.returnData()
|
|
5622
5548
|
};
|
|
5623
5549
|
|
|
5624
|
-
if (!$('#main-nav').length) {
|
|
5550
|
+
if (!$('#main-nav').length || !$('.ssc-nav').length) {
|
|
5625
5551
|
return;
|
|
5626
5552
|
}
|
|
5627
5553
|
|
|
5554
|
+
|
|
5628
5555
|
setTimeout(()=> {
|
|
5629
5556
|
Wick.MainNav.createMainNav(localOptions);
|
|
5630
5557
|
}, 2000)
|
|
5631
5558
|
}
|
|
5632
5559
|
|
|
5633
|
-
init()
|
|
5634
|
-
}
|
|
5560
|
+
init()
|
|
5561
|
+
}();
|
|
5635
5562
|
|
|
5636
5563
|
var Wick = Wick || {};
|
|
5637
5564
|
Wick.ShoppingCart = (function(){
|
|
@@ -5817,80 +5744,6 @@ $(document).ready(() => {
|
|
|
5817
5744
|
}
|
|
5818
5745
|
})
|
|
5819
5746
|
|
|
5820
|
-
var Wick = Wick || {};
|
|
5821
|
-
Wick.PersonalDetailsData = (function(){
|
|
5822
|
-
return {
|
|
5823
|
-
success: {
|
|
5824
|
-
globalMessage: {
|
|
5825
|
-
status: 'success',
|
|
5826
|
-
message: 'Your profile has been updated',
|
|
5827
|
-
},
|
|
5828
|
-
fieldErrors: null,
|
|
5829
|
-
},
|
|
5830
|
-
validationError: {
|
|
5831
|
-
globalMessage: {
|
|
5832
|
-
status: 'error',
|
|
5833
|
-
message: 'Please correct the errors below.',
|
|
5834
|
-
},
|
|
5835
|
-
fieldErrors: [
|
|
5836
|
-
{ field: 'email', message: 'Please enter your email' },
|
|
5837
|
-
],
|
|
5838
|
-
},
|
|
5839
|
-
serverError: {
|
|
5840
|
-
globalMessage: {
|
|
5841
|
-
status: 'error',
|
|
5842
|
-
message: 'Sorry, we were unable to update your personal details, please try again',
|
|
5843
|
-
},
|
|
5844
|
-
fieldErrors: null,
|
|
5845
|
-
},
|
|
5846
|
-
}
|
|
5847
|
-
})()
|
|
5848
|
-
|
|
5849
|
-
function getResponseBasedOnField(personalDetails) {
|
|
5850
|
-
const personalDetailsObject = personalDetails.reduce((acc, { name, value }) => {
|
|
5851
|
-
acc[name] = value;
|
|
5852
|
-
return acc;
|
|
5853
|
-
}, {});
|
|
5854
|
-
|
|
5855
|
-
const { firstName, email } = personalDetailsObject;
|
|
5856
|
-
const isValidationError = email === 'test@gmail.com';
|
|
5857
|
-
const isServerError = firstName === 'server_error';
|
|
5858
|
-
|
|
5859
|
-
if (isValidationError) {
|
|
5860
|
-
return { success: false, response: Wick.PersonalDetailsData.validationError };
|
|
5861
|
-
}
|
|
5862
|
-
|
|
5863
|
-
if (isServerError) {
|
|
5864
|
-
return { success: false, response: Wick.PersonalDetailsData.serverError };
|
|
5865
|
-
}
|
|
5866
|
-
|
|
5867
|
-
return { success: true, response: Wick.PersonalDetailsData.success };
|
|
5868
|
-
}
|
|
5869
|
-
|
|
5870
|
-
function initPersonalDetails() {
|
|
5871
|
-
if (!Wick?.PersonalDetails?.UPDATE_PERSONAL_DETAILS_EVENT) {
|
|
5872
|
-
return;
|
|
5873
|
-
}
|
|
5874
|
-
|
|
5875
|
-
$(window).on(Wick.PersonalDetails.UPDATE_PERSONAL_DETAILS_EVENT, function ({ detail: { resolve, reject } }) {
|
|
5876
|
-
setTimeout(() => {
|
|
5877
|
-
const personalDetails = Wick.LeaveEvent.getState(Wick.PersonalDetails.el.userForm);
|
|
5878
|
-
|
|
5879
|
-
const { success, response } = getResponseBasedOnField(personalDetails);
|
|
5880
|
-
|
|
5881
|
-
if (success) {
|
|
5882
|
-
return resolve(response);
|
|
5883
|
-
} else {
|
|
5884
|
-
return reject(response);
|
|
5885
|
-
}
|
|
5886
|
-
}, 500);
|
|
5887
|
-
});
|
|
5888
|
-
}
|
|
5889
|
-
|
|
5890
|
-
$(document).ready(function () {
|
|
5891
|
-
initPersonalDetails();
|
|
5892
|
-
});
|
|
5893
|
-
|
|
5894
5747
|
function getHtmlByCurrentPage({currentPage}) {
|
|
5895
5748
|
const matchingData = Wick.FEMock.productListPagesData.find(item => item.page === currentPage);
|
|
5896
5749
|
|