@ekyc_qoobiss/qbs-ect-cmp 1.2.9 → 1.2.11
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/dist/cjs/agreement-check_17.cjs.entry.js +34 -13
- package/dist/collection/components/flow/landing-validation/landing-validation.js +28 -2
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +7 -0
- package/dist/collection/components/identification-component/identification-component.js +10 -9
- package/dist/collection/helpers/ApiCall.js +4 -0
- package/dist/collection/helpers/store.js +0 -1
- package/dist/collection/helpers/textValues.js +2 -0
- package/dist/collection/models/IAbortResult.js +1 -0
- package/dist/collection/models/OrderStatuses.js +1 -0
- package/dist/esm/agreement-check_17.entry.js +34 -13
- package/dist/qbs-ect-cmp/{p-f889cc59.entry.js → p-d20c02b1.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +3 -0
- package/dist/types/components/identification-component/identification-component.d.ts +1 -1
- package/dist/types/components.d.ts +5 -0
- package/dist/types/helpers/ApiCall.d.ts +1 -0
- package/dist/types/helpers/textValues.d.ts +2 -0
- package/dist/types/models/IAbortResult.d.ts +3 -0
- package/dist/types/models/OrderStatuses.d.ts +2 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ var OrderStatuses;
|
|
|
10
10
|
OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
|
|
11
11
|
OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
|
|
12
12
|
OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
|
|
13
|
+
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
13
14
|
})(OrderStatuses || (OrderStatuses = {}));
|
|
14
15
|
|
|
15
16
|
const appendToMap = (map, propName, value) => {
|
|
@@ -336,6 +337,7 @@ class ApiUrls {
|
|
|
336
337
|
this.SendLink = this.uriEnv + 'validation/otp/sendlink';
|
|
337
338
|
this.GetStatus = this.uriEnv + 'validation/identity/status';
|
|
338
339
|
this.AddLog = this.uriEnv + 'validation/logs/add';
|
|
340
|
+
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
339
341
|
}
|
|
340
342
|
}
|
|
341
343
|
class MobileRedirectValues extends GlobalValues {
|
|
@@ -343,7 +345,8 @@ class MobileRedirectValues extends GlobalValues {
|
|
|
343
345
|
MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu un smartphone.';
|
|
344
346
|
MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
|
|
345
347
|
MobileRedirectValues.Validation = 'Număr de telefon invalid!';
|
|
346
|
-
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
348
|
+
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
349
|
+
MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
347
350
|
|
|
348
351
|
const { state, onChange } = createStore({
|
|
349
352
|
flowStatus: FlowStatus.LANDING,
|
|
@@ -367,7 +370,6 @@ onChange('token', value => {
|
|
|
367
370
|
sessionStorage.setItem(SessionKeys.TokenKey, value);
|
|
368
371
|
});
|
|
369
372
|
onChange('requestId', value => {
|
|
370
|
-
console.log('Store requestId changed to ' + value);
|
|
371
373
|
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
372
374
|
});
|
|
373
375
|
onChange('initialised', value => {
|
|
@@ -493,6 +495,10 @@ class ApiCall {
|
|
|
493
495
|
}
|
|
494
496
|
catch (_a) { }
|
|
495
497
|
}
|
|
498
|
+
async AbortRequest() {
|
|
499
|
+
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
500
|
+
return result.saved;
|
|
501
|
+
}
|
|
496
502
|
}
|
|
497
503
|
|
|
498
504
|
const agreementCheckCss = "";
|
|
@@ -6062,12 +6068,12 @@ const IdentificationComponent = class {
|
|
|
6062
6068
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
6063
6069
|
}
|
|
6064
6070
|
catch (e) {
|
|
6065
|
-
this.apiErrorEmitter(e);
|
|
6071
|
+
this.apiErrorEmitter(e, 'Agreement Acceptance');
|
|
6066
6072
|
}
|
|
6067
6073
|
}
|
|
6068
|
-
async apiErrorEmitter(data) {
|
|
6074
|
+
async apiErrorEmitter(data, zone) {
|
|
6069
6075
|
var _a, _b;
|
|
6070
|
-
let apiLogData = { message: '', stack: '' };
|
|
6076
|
+
let apiLogData = { message: '', stack: '', zone };
|
|
6071
6077
|
if (data.detail) {
|
|
6072
6078
|
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
6073
6079
|
this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
|
|
@@ -6119,7 +6125,7 @@ const IdentificationComponent = class {
|
|
|
6119
6125
|
if (flowSt) {
|
|
6120
6126
|
state.flowStatus = FlowStatus[flowSt];
|
|
6121
6127
|
}
|
|
6122
|
-
|
|
6128
|
+
else {
|
|
6123
6129
|
state.flowStatus = FlowStatus.LANDING;
|
|
6124
6130
|
}
|
|
6125
6131
|
var ini = sessionStorage.getItem(SessionKeys.InitialisedKey);
|
|
@@ -6140,14 +6146,15 @@ const IdentificationComponent = class {
|
|
|
6140
6146
|
}
|
|
6141
6147
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
6142
6148
|
if (this.order_id) {
|
|
6143
|
-
if (savedRequest && savedRequest != this.order_id) {
|
|
6149
|
+
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
6144
6150
|
sessionStorage.clear();
|
|
6145
6151
|
state.flowStatus = FlowStatus.LANDING;
|
|
6146
6152
|
state.initialised = false;
|
|
6147
6153
|
}
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6154
|
+
state.requestId = this.order_id;
|
|
6155
|
+
}
|
|
6156
|
+
else if (savedRequest) {
|
|
6157
|
+
state.requestId = savedRequest;
|
|
6151
6158
|
}
|
|
6152
6159
|
this.apiCall = new ApiCall();
|
|
6153
6160
|
await this.initializeRequest();
|
|
@@ -6174,7 +6181,7 @@ const IdentificationComponent = class {
|
|
|
6174
6181
|
}
|
|
6175
6182
|
}
|
|
6176
6183
|
catch (e) {
|
|
6177
|
-
this.apiErrorEmitter(e);
|
|
6184
|
+
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6178
6185
|
}
|
|
6179
6186
|
}
|
|
6180
6187
|
render() {
|
|
@@ -6240,11 +6247,12 @@ const landingValidationCss = "";
|
|
|
6240
6247
|
const LandingValidation = class {
|
|
6241
6248
|
constructor(hostRef) {
|
|
6242
6249
|
index.registerInstance(this, hostRef);
|
|
6250
|
+
this.apiErrorEvent = index.createEvent(this, "apiError", 7);
|
|
6243
6251
|
this.device = undefined;
|
|
6244
6252
|
this.warningText = undefined;
|
|
6245
6253
|
}
|
|
6246
6254
|
async componentWillLoad() {
|
|
6247
|
-
|
|
6255
|
+
this.apiCall = new ApiCall();
|
|
6248
6256
|
await this.initRequest();
|
|
6249
6257
|
}
|
|
6250
6258
|
componentDidLoad() {
|
|
@@ -6274,7 +6282,14 @@ const LandingValidation = class {
|
|
|
6274
6282
|
}
|
|
6275
6283
|
async leaveFlow() {
|
|
6276
6284
|
state.initialised = false;
|
|
6277
|
-
|
|
6285
|
+
try {
|
|
6286
|
+
await this.apiCall.AbortRequest();
|
|
6287
|
+
Events.flowAborted();
|
|
6288
|
+
}
|
|
6289
|
+
catch (e) {
|
|
6290
|
+
Events.flowAborted();
|
|
6291
|
+
this.apiErrorEvent.emit(e);
|
|
6292
|
+
}
|
|
6278
6293
|
}
|
|
6279
6294
|
render() {
|
|
6280
6295
|
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !state.initialised, onClick: () => this.startFlow() }, LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
@@ -9214,6 +9229,12 @@ const MobileRedirect = class {
|
|
|
9214
9229
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
9215
9230
|
this.waitingMobile = true;
|
|
9216
9231
|
}
|
|
9232
|
+
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
9233
|
+
this.waitingMobile = false;
|
|
9234
|
+
this.infoTextTop = MobileRedirectValues.InfoAborted;
|
|
9235
|
+
Events.init(window);
|
|
9236
|
+
Events.flowAborted();
|
|
9237
|
+
}
|
|
9217
9238
|
}
|
|
9218
9239
|
async buttonClick() {
|
|
9219
9240
|
if (this.contact == '' || this.contact.length != 10) {
|
|
@@ -8,13 +8,14 @@ import idValidation from '../../../assets/landing/validation.svg';
|
|
|
8
8
|
import store from '../../../helpers/store';
|
|
9
9
|
import Events from '../../../helpers/Events';
|
|
10
10
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
11
|
+
import { ApiCall } from '../../../helpers/ApiCall';
|
|
11
12
|
export class LandingValidation {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.device = undefined;
|
|
14
15
|
this.warningText = undefined;
|
|
15
16
|
}
|
|
16
17
|
async componentWillLoad() {
|
|
17
|
-
|
|
18
|
+
this.apiCall = new ApiCall();
|
|
18
19
|
await this.initRequest();
|
|
19
20
|
}
|
|
20
21
|
componentDidLoad() {
|
|
@@ -44,7 +45,14 @@ export class LandingValidation {
|
|
|
44
45
|
}
|
|
45
46
|
async leaveFlow() {
|
|
46
47
|
store.initialised = false;
|
|
47
|
-
|
|
48
|
+
try {
|
|
49
|
+
await this.apiCall.AbortRequest();
|
|
50
|
+
Events.flowAborted();
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
Events.flowAborted();
|
|
54
|
+
this.apiErrorEvent.emit(e);
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
render() {
|
|
50
58
|
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !store.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
@@ -89,4 +97,22 @@ export class LandingValidation {
|
|
|
89
97
|
"warningText": {}
|
|
90
98
|
};
|
|
91
99
|
}
|
|
100
|
+
static get events() {
|
|
101
|
+
return [{
|
|
102
|
+
"method": "apiErrorEvent",
|
|
103
|
+
"name": "apiError",
|
|
104
|
+
"bubbles": true,
|
|
105
|
+
"cancelable": true,
|
|
106
|
+
"composed": true,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "any",
|
|
113
|
+
"resolved": "any",
|
|
114
|
+
"references": {}
|
|
115
|
+
}
|
|
116
|
+
}];
|
|
117
|
+
}
|
|
92
118
|
}
|
|
@@ -3,6 +3,7 @@ import { MobileRedirectValues } from '../../../helpers/textValues';
|
|
|
3
3
|
import QRCode from 'qrcode';
|
|
4
4
|
import store from '../../../helpers/store';
|
|
5
5
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
6
|
+
import Events from '../../../helpers/Events';
|
|
6
7
|
import { OrderStatuses } from '../../../models/OrderStatuses';
|
|
7
8
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
8
9
|
export class MobileRedirect {
|
|
@@ -60,6 +61,12 @@ export class MobileRedirect {
|
|
|
60
61
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
61
62
|
this.waitingMobile = true;
|
|
62
63
|
}
|
|
64
|
+
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
65
|
+
this.waitingMobile = false;
|
|
66
|
+
this.infoTextTop = MobileRedirectValues.InfoAborted;
|
|
67
|
+
Events.init(window);
|
|
68
|
+
Events.flowAborted();
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
71
|
async buttonClick() {
|
|
65
72
|
if (this.contact == '' || this.contact.length != 10) {
|
|
@@ -70,12 +70,12 @@ export class IdentificationComponent {
|
|
|
70
70
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
71
71
|
}
|
|
72
72
|
catch (e) {
|
|
73
|
-
this.apiErrorEmitter(e);
|
|
73
|
+
this.apiErrorEmitter(e, 'Agreement Acceptance');
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
async apiErrorEmitter(data) {
|
|
76
|
+
async apiErrorEmitter(data, zone) {
|
|
77
77
|
var _a, _b;
|
|
78
|
-
let apiLogData = { message: '', stack: '' };
|
|
78
|
+
let apiLogData = { message: '', stack: '', zone };
|
|
79
79
|
if (data.detail) {
|
|
80
80
|
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
81
81
|
this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
|
|
@@ -126,7 +126,7 @@ export class IdentificationComponent {
|
|
|
126
126
|
if (flowSt) {
|
|
127
127
|
store.flowStatus = FlowStatus[flowSt];
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
else {
|
|
130
130
|
store.flowStatus = FlowStatus.LANDING;
|
|
131
131
|
}
|
|
132
132
|
var ini = sessionStorage.getItem(SessionKeys.InitialisedKey);
|
|
@@ -147,14 +147,15 @@ export class IdentificationComponent {
|
|
|
147
147
|
}
|
|
148
148
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
149
149
|
if (this.order_id) {
|
|
150
|
-
if (savedRequest && savedRequest != this.order_id) {
|
|
150
|
+
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
151
151
|
sessionStorage.clear();
|
|
152
152
|
store.flowStatus = FlowStatus.LANDING;
|
|
153
153
|
store.initialised = false;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
store.requestId = this.order_id;
|
|
156
|
+
}
|
|
157
|
+
else if (savedRequest) {
|
|
158
|
+
store.requestId = savedRequest;
|
|
158
159
|
}
|
|
159
160
|
this.apiCall = new ApiCall();
|
|
160
161
|
await this.initializeRequest();
|
|
@@ -181,7 +182,7 @@ export class IdentificationComponent {
|
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
184
|
catch (e) {
|
|
184
|
-
this.apiErrorEmitter(e);
|
|
185
|
+
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
render() {
|
|
@@ -23,7 +23,6 @@ onChange('token', value => {
|
|
|
23
23
|
sessionStorage.setItem(SessionKeys.TokenKey, value);
|
|
24
24
|
});
|
|
25
25
|
onChange('requestId', value => {
|
|
26
|
-
console.log('Store requestId changed to ' + value);
|
|
27
26
|
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
28
27
|
});
|
|
29
28
|
onChange('initialised', value => {
|
|
@@ -119,6 +119,7 @@ export class ApiUrls {
|
|
|
119
119
|
this.SendLink = this.uriEnv + 'validation/otp/sendlink';
|
|
120
120
|
this.GetStatus = this.uriEnv + 'validation/identity/status';
|
|
121
121
|
this.AddLog = this.uriEnv + 'validation/logs/add';
|
|
122
|
+
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
export class MobileRedirectValues extends GlobalValues {
|
|
@@ -127,3 +128,4 @@ MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu u
|
|
|
127
128
|
MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
|
|
128
129
|
MobileRedirectValues.Validation = 'Număr de telefon invalid!';
|
|
129
130
|
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
131
|
+
MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,5 @@ export var OrderStatuses;
|
|
|
4
4
|
OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
|
|
5
5
|
OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
|
|
6
6
|
OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
|
|
7
|
+
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
7
8
|
})(OrderStatuses || (OrderStatuses = {}));
|
|
@@ -6,6 +6,7 @@ var OrderStatuses;
|
|
|
6
6
|
OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
|
|
7
7
|
OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
|
|
8
8
|
OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
|
|
9
|
+
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
9
10
|
})(OrderStatuses || (OrderStatuses = {}));
|
|
10
11
|
|
|
11
12
|
const appendToMap = (map, propName, value) => {
|
|
@@ -332,6 +333,7 @@ class ApiUrls {
|
|
|
332
333
|
this.SendLink = this.uriEnv + 'validation/otp/sendlink';
|
|
333
334
|
this.GetStatus = this.uriEnv + 'validation/identity/status';
|
|
334
335
|
this.AddLog = this.uriEnv + 'validation/logs/add';
|
|
336
|
+
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
335
337
|
}
|
|
336
338
|
}
|
|
337
339
|
class MobileRedirectValues extends GlobalValues {
|
|
@@ -339,7 +341,8 @@ class MobileRedirectValues extends GlobalValues {
|
|
|
339
341
|
MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu un smartphone.';
|
|
340
342
|
MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
|
|
341
343
|
MobileRedirectValues.Validation = 'Număr de telefon invalid!';
|
|
342
|
-
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
344
|
+
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
345
|
+
MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
343
346
|
|
|
344
347
|
const { state, onChange } = createStore({
|
|
345
348
|
flowStatus: FlowStatus.LANDING,
|
|
@@ -363,7 +366,6 @@ onChange('token', value => {
|
|
|
363
366
|
sessionStorage.setItem(SessionKeys.TokenKey, value);
|
|
364
367
|
});
|
|
365
368
|
onChange('requestId', value => {
|
|
366
|
-
console.log('Store requestId changed to ' + value);
|
|
367
369
|
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
368
370
|
});
|
|
369
371
|
onChange('initialised', value => {
|
|
@@ -489,6 +491,10 @@ class ApiCall {
|
|
|
489
491
|
}
|
|
490
492
|
catch (_a) { }
|
|
491
493
|
}
|
|
494
|
+
async AbortRequest() {
|
|
495
|
+
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
496
|
+
return result.saved;
|
|
497
|
+
}
|
|
492
498
|
}
|
|
493
499
|
|
|
494
500
|
const agreementCheckCss = "";
|
|
@@ -6058,12 +6064,12 @@ const IdentificationComponent = class {
|
|
|
6058
6064
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
6059
6065
|
}
|
|
6060
6066
|
catch (e) {
|
|
6061
|
-
this.apiErrorEmitter(e);
|
|
6067
|
+
this.apiErrorEmitter(e, 'Agreement Acceptance');
|
|
6062
6068
|
}
|
|
6063
6069
|
}
|
|
6064
|
-
async apiErrorEmitter(data) {
|
|
6070
|
+
async apiErrorEmitter(data, zone) {
|
|
6065
6071
|
var _a, _b;
|
|
6066
|
-
let apiLogData = { message: '', stack: '' };
|
|
6072
|
+
let apiLogData = { message: '', stack: '', zone };
|
|
6067
6073
|
if (data.detail) {
|
|
6068
6074
|
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
6069
6075
|
this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
|
|
@@ -6115,7 +6121,7 @@ const IdentificationComponent = class {
|
|
|
6115
6121
|
if (flowSt) {
|
|
6116
6122
|
state.flowStatus = FlowStatus[flowSt];
|
|
6117
6123
|
}
|
|
6118
|
-
|
|
6124
|
+
else {
|
|
6119
6125
|
state.flowStatus = FlowStatus.LANDING;
|
|
6120
6126
|
}
|
|
6121
6127
|
var ini = sessionStorage.getItem(SessionKeys.InitialisedKey);
|
|
@@ -6136,14 +6142,15 @@ const IdentificationComponent = class {
|
|
|
6136
6142
|
}
|
|
6137
6143
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
6138
6144
|
if (this.order_id) {
|
|
6139
|
-
if (savedRequest && savedRequest != this.order_id) {
|
|
6145
|
+
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
6140
6146
|
sessionStorage.clear();
|
|
6141
6147
|
state.flowStatus = FlowStatus.LANDING;
|
|
6142
6148
|
state.initialised = false;
|
|
6143
6149
|
}
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6150
|
+
state.requestId = this.order_id;
|
|
6151
|
+
}
|
|
6152
|
+
else if (savedRequest) {
|
|
6153
|
+
state.requestId = savedRequest;
|
|
6147
6154
|
}
|
|
6148
6155
|
this.apiCall = new ApiCall();
|
|
6149
6156
|
await this.initializeRequest();
|
|
@@ -6170,7 +6177,7 @@ const IdentificationComponent = class {
|
|
|
6170
6177
|
}
|
|
6171
6178
|
}
|
|
6172
6179
|
catch (e) {
|
|
6173
|
-
this.apiErrorEmitter(e);
|
|
6180
|
+
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6174
6181
|
}
|
|
6175
6182
|
}
|
|
6176
6183
|
render() {
|
|
@@ -6236,11 +6243,12 @@ const landingValidationCss = "";
|
|
|
6236
6243
|
const LandingValidation = class {
|
|
6237
6244
|
constructor(hostRef) {
|
|
6238
6245
|
registerInstance(this, hostRef);
|
|
6246
|
+
this.apiErrorEvent = createEvent(this, "apiError", 7);
|
|
6239
6247
|
this.device = undefined;
|
|
6240
6248
|
this.warningText = undefined;
|
|
6241
6249
|
}
|
|
6242
6250
|
async componentWillLoad() {
|
|
6243
|
-
|
|
6251
|
+
this.apiCall = new ApiCall();
|
|
6244
6252
|
await this.initRequest();
|
|
6245
6253
|
}
|
|
6246
6254
|
componentDidLoad() {
|
|
@@ -6270,7 +6278,14 @@ const LandingValidation = class {
|
|
|
6270
6278
|
}
|
|
6271
6279
|
async leaveFlow() {
|
|
6272
6280
|
state.initialised = false;
|
|
6273
|
-
|
|
6281
|
+
try {
|
|
6282
|
+
await this.apiCall.AbortRequest();
|
|
6283
|
+
Events.flowAborted();
|
|
6284
|
+
}
|
|
6285
|
+
catch (e) {
|
|
6286
|
+
Events.flowAborted();
|
|
6287
|
+
this.apiErrorEvent.emit(e);
|
|
6288
|
+
}
|
|
6274
6289
|
}
|
|
6275
6290
|
render() {
|
|
6276
6291
|
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: infoSvg })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: deviceSvg })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: validationSvg })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !state.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
@@ -9210,6 +9225,12 @@ const MobileRedirect = class {
|
|
|
9210
9225
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
9211
9226
|
this.waitingMobile = true;
|
|
9212
9227
|
}
|
|
9228
|
+
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
9229
|
+
this.waitingMobile = false;
|
|
9230
|
+
this.infoTextTop = MobileRedirectValues.InfoAborted;
|
|
9231
|
+
Events.init(window);
|
|
9232
|
+
Events.flowAborted();
|
|
9233
|
+
}
|
|
9213
9234
|
}
|
|
9214
9235
|
async buttonClick() {
|
|
9215
9236
|
if (this.contact == '' || this.contact.length != 10) {
|