ng-easycommerce 0.0.415 → 0.0.418
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 +17 -0
- package/assets/decidirFormEc.html +4 -35
- package/assets/ec-i18n/en.json +2 -1
- package/assets/ec-i18n/es.json +2 -1
- package/bundles/ng-easycommerce.umd.js +41 -31
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/core.consts.js +4 -3
- package/esm2015/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
- package/esm2015/lib/ec-component/login-ec/login-ec.component.js +1 -3
- package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +2 -2
- package/esm2015/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +15 -4
- package/esm2015/lib/interceptors/auth.interceptor.js +3 -3
- package/esm2015/lib/interceptors/customer.interceptor.js +4 -4
- package/esm2015/lib/services/channel-config.service.js +5 -7
- package/esm2015/lib/services/checkout/addressing.service.js +4 -5
- package/esm2015/lib/services/checkout/checkout.service.js +10 -8
- package/esm2015/lib/services/checkout/error-handler.service.js +4 -1
- package/esm5/lib/core.consts.js +3 -2
- package/esm5/lib/ec-component/auth-ec/login-form-ec/login-form-ec.component.js +1 -3
- package/esm5/lib/ec-component/login-ec/login-ec.component.js +1 -3
- package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +2 -2
- package/esm5/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.js +16 -4
- package/esm5/lib/interceptors/auth.interceptor.js +3 -3
- package/esm5/lib/interceptors/customer.interceptor.js +4 -4
- package/esm5/lib/services/channel-config.service.js +5 -7
- package/esm5/lib/services/checkout/addressing.service.js +4 -5
- package/esm5/lib/services/checkout/checkout.service.js +10 -8
- package/esm5/lib/services/checkout/error-handler.service.js +4 -1
- package/fesm2015/ng-easycommerce.js +41 -32
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +41 -31
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/widgets-ec/decidir-ec/decidir-ec.component.d.ts +5 -1
- package/lib/services/checkout/addressing.service.d.ts +3 -3
- package/lib/services/checkout/checkout.service.d.ts +2 -2
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
# version: 0.0.418
|
|
2
|
+
- Actualización del componente Seller Dashboard.
|
|
3
|
+
|
|
4
|
+
- Actualización en el cambio de configuración de canales.
|
|
5
|
+
|
|
6
|
+
# version: 0.0.417
|
|
7
|
+
|
|
8
|
+
- Se parametrizo mensaje de operacion parcial para decidir por parametros backoffice.
|
|
9
|
+
|
|
10
|
+
# version: 0.0.416
|
|
11
|
+
|
|
12
|
+
- Se realizaron ajustes en componente de decidir, nuevos estados.
|
|
13
|
+
|
|
14
|
+
- Se agrego manejo de error cuando los usuarios no se encuentran activos.
|
|
15
|
+
|
|
1
16
|
# version: 0.0.415
|
|
17
|
+
|
|
2
18
|
- Actualización de share-block-ec. Se usa el servicio de parametros para poder elegir que elementos mostrar.
|
|
3
19
|
--El parametro debe ser cargado con la palabra "share" y tambien la red por la que se lo quiere compartir.
|
|
4
20
|
--Ejemplo: "share_whatsapp" o "facebook_share" ...
|
|
5
21
|
|
|
6
22
|
# version: 0.0.414
|
|
23
|
+
|
|
7
24
|
- Actualización de la interfaz de Seller Dashboard
|
|
8
25
|
|
|
9
26
|
- Actualización de metodo para ordernar tabla de clientes
|
|
@@ -13,30 +13,15 @@
|
|
|
13
13
|
const dataDecidirHead = localStorage.getItem('dataDecidir')
|
|
14
14
|
&& JSON.parse(localStorage.getItem('dataDecidir'))
|
|
15
15
|
|
|
16
|
-
console.log("dataDecidirHead", dataDecidirHead);
|
|
17
|
-
console.log("dataDecidirHead.config", dataDecidirHead.config);
|
|
18
|
-
console.log("dataDecidirHead.config.public_environment", dataDecidirHead.config.public_environment);
|
|
19
|
-
|
|
20
16
|
let modoHead = dataDecidirHead?.config?.public_environment || null
|
|
21
|
-
console.log("modoHead 1", modoHead);
|
|
22
|
-
|
|
23
17
|
modoHead && (modoHead == 'prod' && (modoHead = false) || modoHead == 'test' && (modoHead = true))
|
|
24
|
-
|
|
25
|
-
console.log("modoHead 2", modoHead);
|
|
26
|
-
|
|
27
18
|
!modoHead && (modoHead = window.location.host.includes('easycommerce'))
|
|
28
|
-
|
|
29
|
-
console.log('modoHead 3-> ', modoHead);
|
|
30
|
-
|
|
31
19
|
let my_awesome_script = document.createElement('script');
|
|
32
|
-
|
|
33
20
|
my_awesome_script.setAttribute('defer', 'defer')
|
|
34
|
-
|
|
35
21
|
my_awesome_script.setAttribute('src',
|
|
36
22
|
modoHead && 'https://developers.decidir.com/static/v2.5/decidir.js'
|
|
37
23
|
|| 'https://live.decidir.com/static/v2.5/decidir.js'
|
|
38
24
|
);
|
|
39
|
-
|
|
40
25
|
document.head.appendChild(my_awesome_script);
|
|
41
26
|
|
|
42
27
|
</script>
|
|
@@ -197,14 +182,8 @@
|
|
|
197
182
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
198
183
|
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
|
199
184
|
|
|
200
|
-
<script src="https://sdk.mercadopago.com/js/v2"></script>
|
|
201
|
-
|
|
202
185
|
<script defer>
|
|
203
186
|
|
|
204
|
-
const mp = new MercadoPago('APP_USR-d8364d3f-b9fb-4c11-9e47-aa437fc58a8d', {
|
|
205
|
-
locale: 'en-US'
|
|
206
|
-
});
|
|
207
|
-
|
|
208
187
|
window.onload = function () {
|
|
209
188
|
|
|
210
189
|
let loadToken = document.querySelector('#loadToken');
|
|
@@ -254,13 +233,13 @@
|
|
|
254
233
|
.then(response => {
|
|
255
234
|
console.log('Success:', response)
|
|
256
235
|
if (response.hasOwnProperty('status')) {
|
|
257
|
-
if (response.status == 'approved') {
|
|
236
|
+
if (response.status == 'approved' || response.status == 'partially_authorized') {
|
|
258
237
|
processResponse(response)
|
|
259
238
|
} else {
|
|
260
239
|
processError(response)
|
|
261
240
|
}
|
|
262
241
|
} else {
|
|
263
|
-
|
|
242
|
+
processError(response)
|
|
264
243
|
}
|
|
265
244
|
});
|
|
266
245
|
} catch (error) {
|
|
@@ -270,23 +249,13 @@
|
|
|
270
249
|
localStorage.removeItem('dataDecidir')
|
|
271
250
|
}
|
|
272
251
|
|
|
273
|
-
const getAsBin = (data) => {
|
|
274
|
-
mp.getPaymentMethods({ bin: data.bin }).then(
|
|
275
|
-
t => {
|
|
276
|
-
let resultmp = t.results[0]
|
|
277
|
-
let asBin = { tipo_tarjeta_decidir: decidir.cardType(decidir.collectFormData(form).card_number), as_bin: resultmp.id, issuer: resultmp.issuer.name, name: resultmp.name, payment_type: resultmp.payment_type_id, resultmp }
|
|
278
|
-
sendToken({ ...data, ...asBin })
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
}
|
|
282
|
-
|
|
283
252
|
const sdkResponseHandler = (status, response) => {
|
|
284
253
|
if (status != 200 && status != 201) {
|
|
285
254
|
//Manejo de error: Ver Respuesta de Error
|
|
286
255
|
processError(response)
|
|
287
256
|
} else {
|
|
288
257
|
//Manejo de respuesta donde response = {token: "99ab0740-4ef9-4b38-bdf9-c4c963459b22"}
|
|
289
|
-
|
|
258
|
+
sendToken(response)
|
|
290
259
|
}
|
|
291
260
|
}
|
|
292
261
|
|
|
@@ -306,7 +275,7 @@
|
|
|
306
275
|
const processResponse = (response) => {
|
|
307
276
|
console.log("ENVIO BACK ", response);
|
|
308
277
|
isLoad(false)
|
|
309
|
-
localStorage.setItem('state', 'success')
|
|
278
|
+
localStorage.setItem('state', response.status == 'approved' ? 'success' : 'partially_authorized')
|
|
310
279
|
}
|
|
311
280
|
|
|
312
281
|
form.addEventListener('submit', sendForm);
|
package/assets/ec-i18n/en.json
CHANGED
|
@@ -357,5 +357,6 @@
|
|
|
357
357
|
"stop-impersonating": "You are not operating as none of your customers",
|
|
358
358
|
"must-select-customer": "You must select a customer to perform this action.",
|
|
359
359
|
"new-orders": "New orders",
|
|
360
|
-
"operate-as": "Operate as"
|
|
360
|
+
"operate-as": "Operate as",
|
|
361
|
+
"operating-as": "Operating as"
|
|
361
362
|
}
|
package/assets/ec-i18n/es.json
CHANGED
|
@@ -358,5 +358,6 @@
|
|
|
358
358
|
"stop-impersonating": "No se encuentra operando por ninguno de sus clientes",
|
|
359
359
|
"must-select-customer": "Debe seleccionar un cliente para ejecutar esta acción.",
|
|
360
360
|
"new-orders": "Pedidos nuevos",
|
|
361
|
-
"operate-as": "Operar como"
|
|
361
|
+
"operate-as": "Operar como",
|
|
362
|
+
"operating-as": "Operando como"
|
|
362
363
|
}
|
|
@@ -416,11 +416,12 @@
|
|
|
416
416
|
return _this.currency;
|
|
417
417
|
};
|
|
418
418
|
this.modifyChannelConfig = function (channelConfig) {
|
|
419
|
-
console.log("Channel config: ", channelConfig);
|
|
420
419
|
if (channelConfig.channel || channelConfig.code)
|
|
421
420
|
_this.setChannel(channelConfig.channel || channelConfig.code);
|
|
422
421
|
if (channelConfig.locale || channelConfig.locales.code)
|
|
423
422
|
_this.setLocale(channelConfig.locale || channelConfig.locales.code);
|
|
423
|
+
if (channelConfig.currency || channelConfig.baseCurrency)
|
|
424
|
+
_this.setCurrency(channelConfig.currency || channelConfig.baseCurrency);
|
|
424
425
|
return channelConfig;
|
|
425
426
|
};
|
|
426
427
|
}
|
|
@@ -2723,6 +2724,9 @@
|
|
|
2723
2724
|
case 'channel_access_permission_denied':
|
|
2724
2725
|
_this.channeAccessPermissionDenied(error);
|
|
2725
2726
|
break;
|
|
2727
|
+
case 'user_disabled':
|
|
2728
|
+
_this.otherErrors(error);
|
|
2729
|
+
break;
|
|
2726
2730
|
default:
|
|
2727
2731
|
_this.otherErrors(error);
|
|
2728
2732
|
break;
|
|
@@ -2840,7 +2844,7 @@
|
|
|
2840
2844
|
return ar;
|
|
2841
2845
|
};
|
|
2842
2846
|
var CheckoutService = /** @class */ (function () {
|
|
2843
|
-
function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router,
|
|
2847
|
+
function CheckoutService$1(connection, cartService, consts, toastrService, orderUtils, analyticsService, authService, router, errorHandler) {
|
|
2844
2848
|
var _this = this;
|
|
2845
2849
|
this.connection = connection;
|
|
2846
2850
|
this.cartService = cartService;
|
|
@@ -2850,7 +2854,7 @@
|
|
|
2850
2854
|
this.analyticsService = analyticsService;
|
|
2851
2855
|
this.authService = authService;
|
|
2852
2856
|
this.router = router;
|
|
2853
|
-
this.
|
|
2857
|
+
this.errorHandler = errorHandler;
|
|
2854
2858
|
this.baseApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/checkout/' + _this.cartService.getCartToken(); };
|
|
2855
2859
|
this.getPaymentMethodsApi = function () { return _this.baseApi() + '/payment'; };
|
|
2856
2860
|
this.putAddressApi = function () { return _this.baseApi() + '/address'; };
|
|
@@ -3013,11 +3017,13 @@
|
|
|
3013
3017
|
this.cartService.cart.subscribe(function (cart) { return cart && (_this.cartLocal = cart) && _this.updateAsociatedData(cart); });
|
|
3014
3018
|
this.order$.subscribe(function (order) { return order && _this.updateAsociatedData(order); });
|
|
3015
3019
|
this.authService.getUserProfile().subscribe(function (user) { return _this.user = user; });
|
|
3016
|
-
this.
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3020
|
+
this.errorHandler.error$.pipe(operators.filter(function (res) { return res != null; })).subscribe(function (res) {
|
|
3021
|
+
if (res.code == 'out_of_stock' || res.code == 'items_with_product_or_product_variant_not_enabled') {
|
|
3022
|
+
_this.toastrService.show('redirect-cart');
|
|
3023
|
+
setTimeout(function () {
|
|
3024
|
+
_this.router.navigateByUrl('/cart');
|
|
3025
|
+
}, 3000);
|
|
3026
|
+
}
|
|
3021
3027
|
});
|
|
3022
3028
|
}
|
|
3023
3029
|
CheckoutService$1.prototype.ngOnInit = function () {
|
|
@@ -3198,7 +3204,7 @@
|
|
|
3198
3204
|
_this.addressBookApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/address-book'; };
|
|
3199
3205
|
_this.headquarterApi = function () { return 'shop-api/' + _this.consts.getChannel() + '/checkout/' + _this.cartService.getCartToken() + '/headquarter'; };
|
|
3200
3206
|
_this.typeForms = 'ARG';
|
|
3201
|
-
_this.modeSelectAddress = '
|
|
3207
|
+
_this.modeSelectAddress = 'LOAD_ADDRESS_AND_SELECTION';
|
|
3202
3208
|
_this.countriesList = [];
|
|
3203
3209
|
_this.documentTypes = [];
|
|
3204
3210
|
_this.provinceList = [];
|
|
@@ -3347,9 +3353,8 @@
|
|
|
3347
3353
|
];
|
|
3348
3354
|
return formsTypeCofig.find(function (ct) { return ct.code == _this.typeForms; });
|
|
3349
3355
|
};
|
|
3350
|
-
_this.
|
|
3351
|
-
|
|
3352
|
-
_this.modeSelectAddress = type && type || 'ONLY_LOAD_ADDRESS';
|
|
3356
|
+
_this.setTypeSelectAddress = function (type) {
|
|
3357
|
+
_this.modeSelectAddress = type && type || 'LOAD_ADDRESS_AND_SELECTION';
|
|
3353
3358
|
};
|
|
3354
3359
|
_this.setTypeForms = function (type) {
|
|
3355
3360
|
_this.typeForms = type && type || 'ARG';
|
|
@@ -3408,7 +3413,7 @@
|
|
|
3408
3413
|
this.localesSubject = new rxjs.BehaviorSubject([]);
|
|
3409
3414
|
this.locales = this.localesSubject.asObservable();
|
|
3410
3415
|
this.getChannelConfig = function () {
|
|
3411
|
-
_this.connection.get(_this.channelConfigApi()).toPromise().then(function (res) { _this.channelConfigSubject.next(res), res && _this.
|
|
3416
|
+
_this.connection.get(_this.channelConfigApi()).toPromise().then(function (res) { _this.channelConfigSubject.next(res), res && _this.changeChannel(res); }, function (err) { return _this.channelConfigSubject.next({}); }).catch(function (err) { return _this.channelConfigSubject.next(null); });
|
|
3412
3417
|
};
|
|
3413
3418
|
this.getChannels = function () {
|
|
3414
3419
|
_this.connection.get(_this.channelsApi()).toPromise()
|
|
@@ -3421,14 +3426,12 @@
|
|
|
3421
3426
|
.catch(function (err) { return _this.localesSubject.next([]); });
|
|
3422
3427
|
};
|
|
3423
3428
|
this.changeChannel = function (channelObj) {
|
|
3424
|
-
console.log("Channel: ", channelObj);
|
|
3425
3429
|
_this.consts.modifyChannelConfig({
|
|
3426
3430
|
channel: channelObj.code,
|
|
3427
|
-
locale: channelObj.defaultLocale.code
|
|
3428
|
-
|
|
3429
|
-
/* currency: channelObj.baseCurrency */
|
|
3431
|
+
locale: channelObj.defaultLocale.code,
|
|
3432
|
+
currency: channelObj.baseCurrency
|
|
3430
3433
|
});
|
|
3431
|
-
_this.injector.get(AddressingService).
|
|
3434
|
+
_this.injector.get(AddressingService).setTypeSelectAddress(channelObj.headquarterSelectionOnly || 'LOAD_ADDRESS_AND_SELECTION');
|
|
3432
3435
|
};
|
|
3433
3436
|
this.getChannelConfig();
|
|
3434
3437
|
this.getChannels();
|
|
@@ -5281,11 +5284,11 @@
|
|
|
5281
5284
|
return next.handle(req).pipe(operators.catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
|
|
5282
5285
|
};
|
|
5283
5286
|
AuthInterceptor.prototype.handleErrors = function (err) {
|
|
5284
|
-
if (err.status ===
|
|
5287
|
+
if (err.status === 403) {
|
|
5285
5288
|
this.injector.get(AuthService).doLogoutUser();
|
|
5286
5289
|
return rxjs.of(err);
|
|
5287
5290
|
}
|
|
5288
|
-
if (err.status === 450) {
|
|
5291
|
+
if (err.status === 450 || err.status === 401) {
|
|
5289
5292
|
this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
|
|
5290
5293
|
return rxjs.of(err.error);
|
|
5291
5294
|
}
|
|
@@ -5325,11 +5328,11 @@
|
|
|
5325
5328
|
return next.handle(req).pipe(operators.catchError(function (catchErr) { return _this.handleErrors(catchErr); }));
|
|
5326
5329
|
};
|
|
5327
5330
|
CustomerInterceptor.prototype.handleErrors = function (err) {
|
|
5328
|
-
if (err.status ===
|
|
5329
|
-
this.injector.get(AuthService).
|
|
5331
|
+
if (err.status === 403) {
|
|
5332
|
+
this.injector.get(AuthService).doLogoutUser();
|
|
5330
5333
|
return rxjs.of(err);
|
|
5331
5334
|
}
|
|
5332
|
-
if (err.status === 450) {
|
|
5335
|
+
if (err.status === 450 || err.status === 401) {
|
|
5333
5336
|
this.injector.get(ErrorHandlerService).handlerErrorResponse(err.error);
|
|
5334
5337
|
return rxjs.of(err.error);
|
|
5335
5338
|
}
|
|
@@ -8021,12 +8024,10 @@
|
|
|
8021
8024
|
}
|
|
8022
8025
|
else {
|
|
8023
8026
|
_this.loading = false;
|
|
8024
|
-
_this.toastrService.show('invalid-credentials');
|
|
8025
8027
|
}
|
|
8026
8028
|
}, function (err) {
|
|
8027
8029
|
$('#collapse_login5').collapse('hide');
|
|
8028
8030
|
_this.loading = false;
|
|
8029
|
-
_this.toastrService.show('invalid-credentials');
|
|
8030
8031
|
});
|
|
8031
8032
|
};
|
|
8032
8033
|
_this.ecOnConstruct();
|
|
@@ -9189,7 +9190,7 @@
|
|
|
9189
9190
|
SellerDashboardContainerEcComponent = __decorate$17([
|
|
9190
9191
|
core.Component({
|
|
9191
9192
|
selector: 'app-seller-dashboard-container',
|
|
9192
|
-
template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <div\n
|
|
9193
|
+
template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <li class=\"ms-auto row\">\n <div\n class=\"d-flex justify-content-end justify-content-lg-end justify-content-xl-end col-12 col-md-12 col-lg-auto\">\n <ng-container *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') \">\n <a *ngIf=\"authService.getCustomer()?.id; else withoutCustomer\"\n [routerLink]=\"'/collection'\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}\n </a>\n <ng-template #withoutCustomer>\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"\n (click)=\"toastrService.show('must-select-customer')\">\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate\n }}\n </a>\n </ng-template>\n </ng-container>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex camposVendedores col-12 col-md-12 col-lg-auto justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </li>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">\n {{ customer.managementSystemInternalCode || 'n/a' }}\n </div>\n </div>\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
|
|
9193
9194
|
styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:100%!important;margin-left:auto;color:#fff}.cadaVendedor .btnIngresar .contNumero{background-color:#eee;width:20px;height:20px;color:#000;font-size:13px;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;-ms-border-radius:20px;-o-border-radius:20px}.userMobile{font-size:14px!important;font-style:italic!important}.cadaVendedor .btnIngresar a:hover{background-color:rgba(var(--seller-dashboard-primary-color),.85)}.cadaVendedor .btnIngresar a:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.border-bottom{border-bottom:1px solid #000!important}@media screen and (max-width:1200px){.btnGestionar{font-size:12px}}@media screen and (max-width:992px){.camposVendedores{justify-content:flex-end;margin-top:8px;margin-bottom:4px}}@media all and (max-width:768px){.ordenarVendedores{width:140px!important}.buscadorVendedores input{width:140px}.cadaVendedor .btnIngresar a{width:70px!important}}@media all and (max-width:576px){.tablaVendedores .nav-tabs .nav-link{font-size:13px;padding:6px!important}.btnGestionar{padding:6px 8px!important;font-size:13px;height:36px;display:flex;align-items:center;justify-content:center;margin-top:3px;margin-left:10px}.buscadorVendedores input,.ordenarVendedores{font-size:13px}}.fs-6{font-size:1rem!important}"]
|
|
9194
9195
|
}),
|
|
9195
9196
|
__param$9(3, core.Inject('env'))
|
|
@@ -10797,11 +10798,9 @@
|
|
|
10797
10798
|
return;
|
|
10798
10799
|
}
|
|
10799
10800
|
_this.loading = false;
|
|
10800
|
-
_this.toastrService.show('invalid-credentials');
|
|
10801
10801
|
}
|
|
10802
10802
|
}, function (err) {
|
|
10803
10803
|
_this.loading = false;
|
|
10804
|
-
_this.toastrService.show('invalid-credentials');
|
|
10805
10804
|
});
|
|
10806
10805
|
};
|
|
10807
10806
|
_this.redirectHome = function () {
|
|
@@ -13183,7 +13182,7 @@
|
|
|
13183
13182
|
};
|
|
13184
13183
|
var DecidirEcComponent = /** @class */ (function (_super) {
|
|
13185
13184
|
__extends$13(DecidirEcComponent, _super);
|
|
13186
|
-
function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService) {
|
|
13185
|
+
function DecidirEcComponent(renderer, connection, toastrService, consts, cartService, toastr, activedRoute, sanitizer, modalService, paramsService) {
|
|
13187
13186
|
var _this = _super.call(this) || this;
|
|
13188
13187
|
_this.renderer = renderer;
|
|
13189
13188
|
_this.connection = connection;
|
|
@@ -13194,6 +13193,7 @@
|
|
|
13194
13193
|
_this.activedRoute = activedRoute;
|
|
13195
13194
|
_this.sanitizer = sanitizer;
|
|
13196
13195
|
_this.modalService = modalService;
|
|
13196
|
+
_this.paramsService = paramsService;
|
|
13197
13197
|
_this.method = null;
|
|
13198
13198
|
_this.total_amount = 0;
|
|
13199
13199
|
_this.user_data = null;
|
|
@@ -13202,6 +13202,7 @@
|
|
|
13202
13202
|
_this.isDobleAuth = false;
|
|
13203
13203
|
_this.urls = [];
|
|
13204
13204
|
_this.closeModal = '';
|
|
13205
|
+
_this.paramsMensaje = '';
|
|
13205
13206
|
_this.dataRedirect = function () { return _this.consts.getUrlBase() + 'shop-api/' + _this.consts.getChannel() + '/decidir/' + _this.cartService.cart_token + '/process-payment'; };
|
|
13206
13207
|
_this.clearStorageState = function () {
|
|
13207
13208
|
sessionStorage.removeItem('state');
|
|
@@ -13225,6 +13226,10 @@
|
|
|
13225
13226
|
if (state == 'success') {
|
|
13226
13227
|
_this.ready.emit(true);
|
|
13227
13228
|
}
|
|
13229
|
+
if (state == 'partially_authorized') {
|
|
13230
|
+
_this.ready.emit(true);
|
|
13231
|
+
_this.processError(_this.paramsMensaje);
|
|
13232
|
+
}
|
|
13228
13233
|
if (state == 'cancel') {
|
|
13229
13234
|
return;
|
|
13230
13235
|
}
|
|
@@ -13260,7 +13265,12 @@
|
|
|
13260
13265
|
return _this;
|
|
13261
13266
|
}
|
|
13262
13267
|
DecidirEcComponent.prototype.ngOnInit = function () {
|
|
13268
|
+
var _this = this;
|
|
13263
13269
|
this.getCheckoutDecidir();
|
|
13270
|
+
this.paramsService.parameters.subscribe(function (res) {
|
|
13271
|
+
_this.params = res;
|
|
13272
|
+
_this.paramsMensaje = _this.hasParams(res, 'partially_authorized_decidir') || 'Se está procesando el pago con tarjeta.';
|
|
13273
|
+
});
|
|
13264
13274
|
this.ecOnInit();
|
|
13265
13275
|
};
|
|
13266
13276
|
DecidirEcComponent.prototype.ngOnDestroy = function () {
|
|
@@ -13273,7 +13283,6 @@
|
|
|
13273
13283
|
this.clearStorageState();
|
|
13274
13284
|
localStorage.setItem('dataRedirect', this.dataRedirect());
|
|
13275
13285
|
localStorage.setItem('dataDecidir', JSON.stringify(this.method));
|
|
13276
|
-
console.log('dataaaaa', this.method);
|
|
13277
13286
|
this.modalRef = this.modalService.show(template, { class: 'modal-xl modal-dialog-centered ', keyboard: false, backdrop: 'static', animated: true });
|
|
13278
13287
|
this.closeModal = '';
|
|
13279
13288
|
this.callState();
|
|
@@ -13287,7 +13296,8 @@
|
|
|
13287
13296
|
{ type: ToastService },
|
|
13288
13297
|
{ type: router.ActivatedRoute },
|
|
13289
13298
|
{ type: platformBrowser.DomSanitizer },
|
|
13290
|
-
{ type: modal.BsModalService }
|
|
13299
|
+
{ type: modal.BsModalService },
|
|
13300
|
+
{ type: ParametersService }
|
|
13291
13301
|
]; };
|
|
13292
13302
|
__decorate$1E([
|
|
13293
13303
|
core.Input()
|