95d9d2f9a8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
995 lines
48 KiB
JavaScript
995 lines
48 KiB
JavaScript
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2268],{
|
|
|
|
/***/ 24140:
|
|
/*!****************************************************************************************************************!*\
|
|
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation-routing.module.ts ***!
|
|
\****************************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "IdentityEmailConfirmationPageRoutingModule": () => (/* binding */ IdentityEmailConfirmationPageRoutingModule)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity-email-confirmation.page */ 17243);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
|
|
|
|
|
|
const routes = [
|
|
{
|
|
path: '',
|
|
component: _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPage
|
|
}
|
|
];
|
|
class IdentityEmailConfirmationPageRoutingModule {
|
|
}
|
|
IdentityEmailConfirmationPageRoutingModule.ɵfac = function IdentityEmailConfirmationPageRoutingModule_Factory(t) { return new (t || IdentityEmailConfirmationPageRoutingModule)(); };
|
|
IdentityEmailConfirmationPageRoutingModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({ type: IdentityEmailConfirmationPageRoutingModule });
|
|
IdentityEmailConfirmationPageRoutingModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] });
|
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵsetNgModuleScope"](IdentityEmailConfirmationPageRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12268:
|
|
/*!********************************************************************************************************!*\
|
|
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation.module.ts ***!
|
|
\********************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "IdentityEmailConfirmationPageModule": () => (/* binding */ IdentityEmailConfirmationPageModule)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity-email-confirmation-routing.module */ 24140);
|
|
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
|
|
/* harmony import */ var _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity-email-confirmation.page */ 17243);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
|
|
|
|
|
|
|
|
|
class IdentityEmailConfirmationPageModule {
|
|
}
|
|
IdentityEmailConfirmationPageModule.ɵfac = function IdentityEmailConfirmationPageModule_Factory(t) { return new (t || IdentityEmailConfirmationPageModule)(); };
|
|
IdentityEmailConfirmationPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ type: IdentityEmailConfirmationPageModule });
|
|
IdentityEmailConfirmationPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule, _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPageRoutingModule] });
|
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](IdentityEmailConfirmationPageModule, { declarations: [_identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_3__.IdentityEmailConfirmationPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule, _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPageRoutingModule] }); })();
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 17243:
|
|
/*!******************************************************************************************************!*\
|
|
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation.page.ts ***!
|
|
\******************************************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "IdentityEmailConfirmationPage": () => (/* binding */ IdentityEmailConfirmationPage)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 2508);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/services */ 17253);
|
|
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ 93819);
|
|
/* harmony import */ var _shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @shared/services/init.register.has-company.storage.service */ 91056);
|
|
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_5__);
|
|
/* harmony import */ var _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../shared/components/full-logo/full-logo.component */ 33159);
|
|
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ngx-translate/core */ 38699);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const _c0 = function (a0) {
|
|
return {
|
|
"min-height": a0,
|
|
"position": "relative"
|
|
};
|
|
};
|
|
|
|
class IdentityEmailConfirmationPage {
|
|
constructor(formBuilder, api, activatedRoute, notificatorService, loadingService, keyboardService, sendVerificationEmailModalService, warnConflictModalService, ngZoneService, deviceInfoService, navigationService, logService, translateConfigService, authService, storageService, deviceUuidService, platform, saveFlowStorageResetKeyService, utilsService, showToastModalErroCodeZero, initRegisterHasCompanyStorageService) {
|
|
var _this = this;
|
|
|
|
this.formBuilder = formBuilder;
|
|
this.api = api;
|
|
this.activatedRoute = activatedRoute;
|
|
this.notificatorService = notificatorService;
|
|
this.loadingService = loadingService;
|
|
this.keyboardService = keyboardService;
|
|
this.sendVerificationEmailModalService = sendVerificationEmailModalService;
|
|
this.warnConflictModalService = warnConflictModalService;
|
|
this.ngZoneService = ngZoneService;
|
|
this.deviceInfoService = deviceInfoService;
|
|
this.navigationService = navigationService;
|
|
this.logService = logService;
|
|
this.translateConfigService = translateConfigService;
|
|
this.authService = authService;
|
|
this.storageService = storageService;
|
|
this.deviceUuidService = deviceUuidService;
|
|
this.platform = platform;
|
|
this.saveFlowStorageResetKeyService = saveFlowStorageResetKeyService;
|
|
this.utilsService = utilsService;
|
|
this.showToastModalErroCodeZero = showToastModalErroCodeZero;
|
|
this.initRegisterHasCompanyStorageService = initRegisterHasCompanyStorageService;
|
|
this.obfuscatedEmail = undefined;
|
|
this.fullDataParans = {};
|
|
|
|
this.onSendVerificationEmailModalStateChange = /*#__PURE__*/function () {
|
|
var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (state) {
|
|
yield _this.ngZoneService.run(() => {
|
|
_this.showSendVerificationEmailModal = state.show;
|
|
_this.emailSendVerificationEmailModal = state.email;
|
|
});
|
|
});
|
|
|
|
return function (_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
this.onWarnConflictModalStateChange = /*#__PURE__*/function () {
|
|
var _ref2 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (state) {
|
|
yield _this.ngZoneService.run(() => {
|
|
_this.showWarnConflictModal = state.show;
|
|
_this.emailWarnConflictModal = state.email;
|
|
});
|
|
});
|
|
|
|
return function (_x2) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
this.onSubmit = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
let uuidStorage = null;
|
|
uuidStorage = yield _this.getUniqueDeviceId();
|
|
_this.uuid = uuidStorage ?? '';
|
|
|
|
if (!_this.uuid || _this.uuid === null || _this.uuid === undefined || _this.uuid.length <= 0) {
|
|
_this.logService.logEvent('UUIID::in_Submit', 'Null UUID - Methodo Submit');
|
|
|
|
return;
|
|
}
|
|
|
|
const validationResult = _this.validateForm(_this.fullNameForm);
|
|
|
|
if (!validationResult) {
|
|
_this.logService.logError('user::register-full-name');
|
|
|
|
const notification = {
|
|
title: _this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_INVALID_DATA_TITLE'),
|
|
message: _this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_INVALID_DATA_MESSAGE'),
|
|
type: 'error'
|
|
};
|
|
|
|
_this.notificatorService.notify(notification);
|
|
} else {
|
|
let onHideSubscription = null;
|
|
|
|
const onKeyboardHideCallback = () => {
|
|
if (onHideSubscription) {
|
|
onHideSubscription.unsubscribe();
|
|
}
|
|
|
|
_this.loadingService.show(_this.translateConfigService.translate('LOADING_PROCESSING_DATA'), 'identity-validator-full-name');
|
|
|
|
const firstName = _this.getFirstName();
|
|
|
|
const lastName = _this.getLastName();
|
|
|
|
if (_this.foreign) {
|
|
const documentUppercase = _this.utilsService.convertToUppercase(_this.document);
|
|
|
|
_this.api.verifyForeignFullName(documentUppercase, firstName, lastName, _this.foreign).subscribe(_this.verifyFullNameSuccessResponse, _this.verifyFullNameErrorResponse);
|
|
} else {
|
|
_this.api.verifyFullName(_this.document, firstName, lastName, _this.foreign).subscribe(_this.verifyFullNameSuccessResponse, _this.verifyFullNameErrorResponse);
|
|
}
|
|
};
|
|
|
|
onHideSubscription = _this.keyboardService.onHideObservable?.subscribe(onKeyboardHideCallback);
|
|
|
|
if (!_this.keyboardService.isVisible()) {
|
|
onKeyboardHideCallback();
|
|
} else {
|
|
_this.keyboardService.hide();
|
|
}
|
|
}
|
|
});
|
|
|
|
this.getFirstName = () => {
|
|
let fullName = this.fullNameForm.controls.fullName.value;
|
|
fullName = fullName.trim();
|
|
fullName = fullName.split(' ');
|
|
return fullName[0] ? fullName[0] : '';
|
|
};
|
|
|
|
this.getLastName = () => {
|
|
let fullName = this.fullNameForm.controls.fullName.value;
|
|
fullName = fullName.trim();
|
|
fullName = fullName.split(' ');
|
|
fullName = fullName.filter((namePiece, i) => i !== 0);
|
|
return fullName.join(' ');
|
|
};
|
|
|
|
this.validateForm = form => {
|
|
const firstName = this.getFirstName();
|
|
const lastName = this.getLastName();
|
|
|
|
if (firstName && lastName) {
|
|
const firstNameLength = firstName.length;
|
|
const lastNameLength = lastName.length;
|
|
return firstNameLength + lastNameLength > 2 && firstNameLength + lastNameLength < 255;
|
|
} else {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
this.verifyFullNameForeignSuccessResponse = response => {
|
|
this.checkAccount();
|
|
};
|
|
|
|
this.verifyFullNameSuccessResponse = response => {
|
|
if (this.verifyIfMatch(response)) {
|
|
this.checkAccount();
|
|
} else {
|
|
this.logService.logEvent('user::register-full-name-no-match');
|
|
this.showErroNoMatchNameDocument(response);
|
|
}
|
|
};
|
|
|
|
this.verifyFullNameErrorResponse = response => {
|
|
this.logService.logError('http::register-full-name', '', response);
|
|
|
|
if (response && response?.error && response?.error?.errorKey && response?.error.status === 400) {
|
|
const match = response?.error?.errorKey === 'notmatched' ? false : true;
|
|
|
|
if (this.verifyIfMatch({
|
|
matched: match
|
|
})) {
|
|
this.checkAccount();
|
|
} else {
|
|
this.showErroNoMatchNameDocument(response);
|
|
return;
|
|
}
|
|
}
|
|
|
|
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
if (response?.status === 0) {
|
|
this.showToastModalErroCodeZero.showToast();
|
|
this.logService.logError('http::register-full-name', 'Unknown error', response);
|
|
return;
|
|
}
|
|
|
|
if (response.status === 400) {
|
|
const notification = {
|
|
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_ERROR_REQUEST_TITLE'),
|
|
message: `${this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_ERROR_REQUEST_MESSAGE')} (cod. 400)`,
|
|
type: 'error'
|
|
};
|
|
return this.notificatorService.notify(notification);
|
|
} else if (response.status === 404) {
|
|
this.checkAccount();
|
|
} else {
|
|
let message;
|
|
|
|
if (this.foreign) {
|
|
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NOT_FOUND_MESSAGE');
|
|
}
|
|
|
|
const notification = {
|
|
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE'),
|
|
message,
|
|
type: 'error'
|
|
};
|
|
this.notificatorService.notify(notification);
|
|
}
|
|
});
|
|
};
|
|
|
|
this.checkAccount = () => {
|
|
const uuid = this.uuid;
|
|
const document = this.document;
|
|
const foreign = this.foreign;
|
|
const documentUppercase = foreign ? this.utilsService.convertToUppercase(document) : document;
|
|
this.api.accountCheck(uuid, documentUppercase, foreign).subscribe(this.accountCheckSuccessResponse, this.accountCheckErrorResponse);
|
|
};
|
|
|
|
this.accountCheckSuccessResponse = response => {
|
|
const hasAnyCompany = response && response.hasAnyCompany;
|
|
const activated = response && response.activated;
|
|
const obfuscatedEmail = response && response.obfuscatedEmail ? response.obfuscatedEmail : '';
|
|
|
|
if (!this.context && hasAnyCompany && activated) {
|
|
this.context = 'has-company';
|
|
}
|
|
|
|
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
if (this.context === 'forgot-pin' || this.context === 'has-company') {
|
|
this.onSendVerificationEmail(obfuscatedEmail, response);
|
|
} else {
|
|
this.goToCompanyCodeStep(response);
|
|
}
|
|
});
|
|
};
|
|
|
|
this.goToCompanyCodeStep = response => {
|
|
const activated = response.activated ? response.activated : false;
|
|
const email = response.obfuscatedEmail ? response.obfuscatedEmail : '';
|
|
const uuid = this.uuid;
|
|
const document = this.document;
|
|
const firstName = this.getFirstName();
|
|
const lastName = this.getLastName();
|
|
const conflict = false;
|
|
const foreign = this.foreign;
|
|
const documentUppercase = foreign ? this.utilsService.convertToUppercase(document) : document;
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
uuid,
|
|
document: documentUppercase,
|
|
firstName,
|
|
lastName,
|
|
email,
|
|
conflict,
|
|
activated,
|
|
foreign
|
|
}
|
|
};
|
|
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
};
|
|
|
|
this.accountCheckErrorResponse = response => {
|
|
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
if (response.status === 404) {
|
|
const uuid = this.uuid;
|
|
const document = this.document;
|
|
const firstName = this.getFirstName();
|
|
const lastName = this.getLastName();
|
|
const foreign = this.foreign;
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
uuid,
|
|
document,
|
|
firstName,
|
|
lastName,
|
|
foreign
|
|
}
|
|
};
|
|
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
} else if (response.status === 409) {
|
|
if (response.error.conflictType === 'notFound') {
|
|
// "notFound" achou alguém com o deviceId mas não tem uma conta para esse documento
|
|
const uuid = this.uuid;
|
|
const document = this.document;
|
|
const firstName = this.getFirstName();
|
|
const lastName = this.getLastName();
|
|
const conflict = 'notFound';
|
|
const foreign = this.foreign;
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
uuid,
|
|
document,
|
|
firstName,
|
|
lastName,
|
|
conflict,
|
|
foreign
|
|
}
|
|
};
|
|
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
} else if (response.error.conflictType === 'found') {
|
|
// "found" achou ou não achou alguém com o deviceId mas tem uma conta com esse documento
|
|
const hasAnyCompany = response && response.error.hasAnyCompany;
|
|
const activated = response && response.error.activated;
|
|
|
|
if (!this.context && hasAnyCompany && activated) {
|
|
this.context = 'has-company';
|
|
}
|
|
|
|
if (this.context === 'has-company') {
|
|
this.onSendVerificationEmail(response.error.params || null);
|
|
} else {
|
|
const email = response.error.params;
|
|
const uuid = this.uuid;
|
|
const document = this.document;
|
|
const firstName = this.getFirstName();
|
|
const lastName = this.getLastName();
|
|
const conflict = 'found';
|
|
const foreign = this.foreign;
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
uuid,
|
|
document,
|
|
firstName,
|
|
lastName,
|
|
email,
|
|
conflict,
|
|
foreign
|
|
}
|
|
};
|
|
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
}
|
|
}
|
|
} else {
|
|
this.logService.logError('http::account-check', '', response);
|
|
const notification = {
|
|
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE'),
|
|
message: `${this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_CHECKING_DATA_ERROR_MESSAGE')} (cod. ${response.status})`,
|
|
type: 'error'
|
|
};
|
|
this.notificatorService.notify(notification);
|
|
}
|
|
});
|
|
};
|
|
|
|
this.stepBack = () => {
|
|
const document = this.document;
|
|
const uuid = this.uuid;
|
|
const foreign = this.foreign;
|
|
const context = this.context;
|
|
|
|
if (foreign) {
|
|
const documentUppercase = this.utilsService.convertToUppercase(document);
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
document: documentUppercase,
|
|
uuid,
|
|
foreign,
|
|
context
|
|
}
|
|
};
|
|
this.navigationService.back(['/foreign-document'], navigationOptions);
|
|
} else {
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
document,
|
|
uuid,
|
|
foreign,
|
|
context
|
|
}
|
|
};
|
|
this.navigationService.back(['/identity-validator'], navigationOptions);
|
|
}
|
|
};
|
|
|
|
this.onSendVerificationEmailModalBack = () => {
|
|
this.sendVerificationEmailModalService.hideModal();
|
|
};
|
|
|
|
this.onSendVerificationEmail = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (obfuscatedEmail = null, response) {
|
|
const uuid = _this.uuid;
|
|
const document = _this.document;
|
|
const foreign = _this.foreign;
|
|
const firstName = _this.firstName;
|
|
const lastName = _this.lastName;
|
|
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
|
|
_this.loadingService.show(_this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_LOADING_SEND_MAIL'), 'send-email-verification');
|
|
|
|
const isInitForgot = yield _this.saveFlowStorageResetKeyService.getInitForgot();
|
|
|
|
if (response && isInitForgot && isInitForgot?.isInitiatedForgotten || _this.context === 'forgot-pin') {
|
|
const currentLangKey = _this.translateConfigService.getCurrentLang() === 'pt' ? 'pt-Br' : _this.translateConfigService.getCurrentLang(); // TODO: pegar do storage essas informações abaixo. (email, firstname, refid, document)
|
|
|
|
const email = response?.email ?? '';
|
|
const langKey = currentLangKey;
|
|
const refId = (yield _this.authService.getRefId()) ?? null;
|
|
const resetKey = '';
|
|
|
|
_this.saveFlowStorageResetKeyService.setDataResetKeyInit({
|
|
refId,
|
|
firstName,
|
|
email,
|
|
obfuscatedEmail,
|
|
langKey,
|
|
document,
|
|
resetKey
|
|
});
|
|
|
|
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
|
|
_this.api.accountDeviceResetInit(uuid, documentUppercase, foreign, {
|
|
refId,
|
|
firstName,
|
|
email,
|
|
langKey,
|
|
resetKey
|
|
}).subscribe(() => _this.accountDeviceResetInitSuccessResponse(obfuscatedEmail), error => _this.accountDeviceResetInitErrorResponse(error));
|
|
} else {
|
|
_this.api.accountDeviceResetInit(uuid, documentUppercase, foreign, null).subscribe(() => _this.accountDeviceResetInitSuccessResponse(obfuscatedEmail), error => _this.accountDeviceResetInitErrorResponse(error));
|
|
}
|
|
});
|
|
|
|
this.onWarnConflictModalBack = () => {
|
|
this.warnConflictModalService.hideModal();
|
|
};
|
|
|
|
this.onWarnConflictModalAccept = () => {
|
|
const email = this.email;
|
|
this.warnConflictModalService.hideModal();
|
|
this.sendVerificationEmailModalService.showModal(email);
|
|
};
|
|
|
|
this.accountDeviceResetInitSuccessResponse = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (obfuscatedEmail = null) {
|
|
yield _this.loadingService.hide(null, 'send-email-verification');
|
|
const uuid = _this.uuid;
|
|
const document = _this.document;
|
|
const firstName = _this.firstName;
|
|
const lastName = _this.lastName;
|
|
const email = _this.email;
|
|
const context = _this.context;
|
|
const foreign = _this.foreign;
|
|
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
uuid,
|
|
document: documentUppercase,
|
|
firstName,
|
|
lastName,
|
|
email,
|
|
context,
|
|
foreign,
|
|
obfuscatedEmail
|
|
}
|
|
};
|
|
|
|
_this.sendVerificationEmailModalService.hideModal();
|
|
|
|
if (_this.context === 'forgot-pin') {
|
|
_this.navigationService.forward(['/identity-insert-password'], navigationOptions);
|
|
} else {
|
|
const data = _this.initRegisterHasCompanyStorageService.get();
|
|
|
|
if (data) {
|
|
console.log('data', data);
|
|
}
|
|
|
|
_this.navigationService.forward(['has-company/identity-validator-code']);
|
|
}
|
|
});
|
|
|
|
this.accountDeviceResetInitErrorResponse = /*#__PURE__*/function () {
|
|
var _ref6 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
|
|
console.log('accountCheckErrorResponse');
|
|
console.log('response:', response);
|
|
|
|
_this.logService.logError('http::account-device-reset-init', '', response);
|
|
|
|
yield _this.loadingService.hide(null, 'send-email-verification');
|
|
|
|
if (response?.status === 0) {
|
|
_this.showToastModalErroCodeZero.showToast();
|
|
|
|
_this.logService.logError('http::account-device-reset-init', 'Unknown error', response);
|
|
|
|
return;
|
|
}
|
|
|
|
const {
|
|
title,
|
|
message
|
|
} = _this.getTitleAndMessage(response);
|
|
|
|
_this.toastNotificationError(title, message, 1000);
|
|
});
|
|
|
|
return function (_x3) {
|
|
return _ref6.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
this.getUniqueDeviceId = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
let uuidStorage = '';
|
|
const storageIsReady = yield _this.storageService.ready();
|
|
|
|
if (storageIsReady) {
|
|
uuidStorage = yield _this.authService.getUUID();
|
|
}
|
|
|
|
if (!uuidStorage || uuidStorage === undefined || uuidStorage === null) {
|
|
return _this.deviceUuidService.getUUID().then(_this.onGetUniqueDeviceIdSuccessResponse).catch(_this.onGetUniqueDeviceIdErrorResponse);
|
|
} else {
|
|
_this.uuid = uuidStorage;
|
|
return _this.uuid;
|
|
}
|
|
});
|
|
|
|
this.onGetUniqueDeviceIdSuccessResponse = /*#__PURE__*/function () {
|
|
var _ref8 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (uuid) {
|
|
try {
|
|
const saveUUID = yield _this.saveUUIDStorage(uuid);
|
|
_this.uuid = saveUUID.uuid;
|
|
return saveUUID.uuid;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
});
|
|
|
|
return function (_x4) {
|
|
return _ref8.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
this.onGetUniqueDeviceIdErrorResponse = error => {
|
|
const message = this.translateConfigService.translate('PG_START_TOAST_AUTHORIZE');
|
|
const title = this.translateConfigService.translate('PG_START_TOAST_NOTICE_TITLE');
|
|
const notification = {
|
|
title,
|
|
message,
|
|
type: 'error'
|
|
};
|
|
this.notificatorService.notify(notification);
|
|
}; // this.activatedRoute.queryParams.subscribe(params => {
|
|
// this.document = params.document ? params.document : '';
|
|
// this.context = params.context ? params.context : '';
|
|
// this.obfuscatedEmail = params?.obfuscatedEmail ?? '';
|
|
// this.foreign = params?.foreign === 'true';
|
|
// this.uuid = params?.uuid ?? null;
|
|
// this.firstName = params?.firstName ?? '';
|
|
// this.lastName = params?.lastName ?? '';
|
|
// this.email = params.email ? params.email : '';
|
|
// this.conflict = params.conflict ? params.conflict : '';
|
|
// this.fullDataParans = params;
|
|
// console.log(this.fullDataParans);
|
|
// });
|
|
|
|
}
|
|
|
|
ionViewWillEnter() {
|
|
const data = this.getDataRegisterHasCompanyStorageService();
|
|
|
|
if (data) {
|
|
this.document = data?.document ?? '';
|
|
this.context = data?.context ?? '';
|
|
this.obfuscatedEmail = data?.obfuscatedEmail ?? '';
|
|
this.foreign = data?.foreign === 'true' || data?.foreign === true;
|
|
this.uuid = data?.uuid ?? null;
|
|
this.firstName = data?.firstName ?? '';
|
|
this.lastName = data?.lastName ?? '';
|
|
this.email = data?.email ?? '';
|
|
this.conflict = data?.conflict ?? '';
|
|
console.log('onViewWillEnter page-main-confirmation', data);
|
|
}
|
|
}
|
|
|
|
ngOnInit() {
|
|
console.log('onInit');
|
|
this.fullNameForm = this.formBuilder.group({
|
|
fullName: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.minLength(3), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(5)]]
|
|
});
|
|
this.sendVerificationEmailModalService.observable.subscribe(this.onSendVerificationEmailModalStateChange);
|
|
this.warnConflictModalService.observable.subscribe(this.onWarnConflictModalStateChange);
|
|
}
|
|
|
|
getDataRegisterHasCompanyStorageService() {
|
|
return this.initRegisterHasCompanyStorageService.get();
|
|
}
|
|
|
|
verifyIfMatch(data) {
|
|
return data.matched;
|
|
}
|
|
|
|
onHasEmailAccess(obfuscatedEmail) {
|
|
this.onSendVerificationEmail(obfuscatedEmail);
|
|
}
|
|
|
|
notHasEmailAccess(obfuscatedEmail) {
|
|
const data = this.initRegisterHasCompanyStorageService.get();
|
|
|
|
if (data) {
|
|
const activated = data?.activated;
|
|
const hasAnyCompany = data?.hasAnyCompany;
|
|
const uuid = data?.uuid;
|
|
const document = data?.document;
|
|
const foreign = data?.foreign;
|
|
const firstName = data?.firstName;
|
|
const lastName = data?.lastName;
|
|
const context = data?.context;
|
|
const conflict = data?.conflict;
|
|
const email = data?.email;
|
|
const documentUppercase = this.utilsService.convertToUppercase(document);
|
|
const navigationOptions = {
|
|
queryParams: {
|
|
document: documentUppercase,
|
|
uuid,
|
|
foreign,
|
|
firstName,
|
|
lastName,
|
|
conflict,
|
|
context
|
|
}
|
|
};
|
|
this.initRegisterHasCompanyStorageService.set({ ...data
|
|
});
|
|
|
|
if (this.context === 'forgot-pin') {
|
|
this.navigationService.forward(['/identity-insert-password'], navigationOptions);
|
|
}
|
|
|
|
this.navigationService.forward(['has-company/identity-validator-code-company']);
|
|
}
|
|
}
|
|
|
|
back() {
|
|
this.navigationService.back(['/identity-validator-full-name']);
|
|
}
|
|
|
|
getTitleAndMessage(response) {
|
|
const title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE');
|
|
const message = `${this.translateConfigService.translate('TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE')} (cod. ${response.status})`;
|
|
return {
|
|
title,
|
|
message
|
|
};
|
|
}
|
|
|
|
toastNotificationError(title, message, timeout) {
|
|
const notification = {
|
|
title,
|
|
message,
|
|
type: 'error',
|
|
timeout
|
|
};
|
|
this.notificatorService.notify(notification);
|
|
}
|
|
|
|
saveUUIDStorage(uuid) {
|
|
var _this2 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
let resUUID = {
|
|
uuid: '',
|
|
success: false
|
|
};
|
|
|
|
try {
|
|
yield _this2.platform.ready();
|
|
|
|
try {
|
|
const storageIsReady = yield _this2.storageService.ready();
|
|
|
|
if (storageIsReady) {
|
|
try {
|
|
yield _this2.authService.setUUID(uuid);
|
|
resUUID = {
|
|
uuid,
|
|
success: true
|
|
};
|
|
|
|
_this2.logService.logEvent('setUUIDIdentityValidadeFullName::', 'Success save UUID in storage', resUUID);
|
|
|
|
return resUUID;
|
|
} catch (error) {
|
|
resUUID = { ...error,
|
|
uuid: null,
|
|
success: false
|
|
};
|
|
|
|
_this2.logService.logError('ErrorSetUUIDIdentityValidadeFullName::', 'erro save UUID in storage', resUUID);
|
|
|
|
throw resUUID;
|
|
}
|
|
}
|
|
} catch (error) {
|
|
_this2.logService.logError('ErrorstorageIdentityValidadeFullName::', 'not avaliable storage ready', error);
|
|
|
|
throw error;
|
|
}
|
|
} catch (error) {
|
|
_this2.logService.logError('platformReadyStartPage::', 'not avaliable platform ready', error);
|
|
}
|
|
})();
|
|
}
|
|
|
|
showErroNoMatchNameDocument(response) {
|
|
this.logService.logError('NoMatchNameDocument', '', {
|
|
data: response
|
|
});
|
|
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
let message;
|
|
let title;
|
|
|
|
if (this.foreign) {
|
|
title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_FOREIGN_TITLE');
|
|
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_FOREIGN_MESSAGE');
|
|
} else {
|
|
title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_TITLE');
|
|
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_MESSAGE');
|
|
}
|
|
|
|
const notification = {
|
|
title,
|
|
message,
|
|
type: 'error',
|
|
timeout: 8000
|
|
};
|
|
this.notificatorService.notify(notification);
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
IdentityEmailConfirmationPage.ɵfac = function IdentityEmailConfirmationPage_Factory(t) {
|
|
return new (t || IdentityEmailConfirmationPage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_3__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.KeyboardService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.SendVerificationEmailModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.WarnConflictModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NgZoneService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.DeviceUuidService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_8__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.SaveFlowStorageResetKeyService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.UtilsService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ShowToastAndModalErroCodeZeroService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_4__.InitRegisterHasCompanyStorageService));
|
|
};
|
|
|
|
IdentityEmailConfirmationPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
|
|
type: IdentityEmailConfirmationPage,
|
|
selectors: [["app-identity-email-confirmation"]],
|
|
decls: 24,
|
|
vars: 16,
|
|
consts: [[1, "ion-no-border", 2, "height", "0"], [3, "ngStyle"], [1, "ion-margin-vertical"], [1, "flex-auto"], ["size", "12"], [1, "hasEmail"], [1, "button-holder", "btns"], [1, "btn_default", 3, "click"], [1, "button-holder", "footer"], [1, "back", 3, "click"]],
|
|
template: function IdentityEmailConfirmationPage_Template(rf, ctx) {
|
|
if (rf & 1) {
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "ion-header", 0);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "ion-content")(2, "ion-grid", 1)(3, "ion-row")(4, "ion-col", 2);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "app-full-logo");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](6, "ion-row", 3)(7, "ion-col", 4)(8, "div", 5);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](9);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](10, "translate");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](11, "br");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](13, "div", 6)(14, "button", 7);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_14_listener() {
|
|
return ctx.onHasEmailAccess(ctx.obfuscatedEmail);
|
|
});
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](16, "translate");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](17, "button", 7);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_17_listener() {
|
|
return ctx.notHasEmailAccess(ctx.obfuscatedEmail);
|
|
});
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](18);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](19, "translate");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](20, "div", 8)(21, "button", 9);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_21_listener() {
|
|
return ctx.back();
|
|
});
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](22);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](23, "translate");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
|
|
}
|
|
|
|
if (rf & 2) {
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](14, _c0, ctx.deviceInfoService.getDeviceHeight() + "px"));
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](7);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](10, 6, "HAS_COMPANY_REGISTER.EMAIL_CONFIRMATION_EMAIL.DO_YOU_STILL_HAVE_ACCESS_TO_THE_EMAIL"), " ");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", ctx.obfuscatedEmail, "? ");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](16, 8, "TEXT_YES"), " ");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](19, 10, "TEXT_NOT"), " ");
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](4);
|
|
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](23, 12, "BTN_BACK"));
|
|
}
|
|
},
|
|
dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.NgStyle, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonGrid, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonHeader, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonRow, _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_6__.FullLogoComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__.TranslatePipe],
|
|
styles: [".hasEmail[_ngcontent-%COMP%] {\n display: flex;\n position: relative;\n justify-content: space-around;\n align-items: center;\n text-align: center;\n margin: 3em 0 6em 0;\n font-size: 1.1em;\n width: 100%;\n}\n\n.button-holder.footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin: 0 auto;\n padding-bottom: 2em;\n}\n\n.btn_default[_ngcontent-%COMP%] {\n width: 40%;\n font-weight: 800;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlkZW50aXR5LWVtYWlsLWNvbmZpcm1hdGlvbi5wYWdlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0Esa0JBQUE7RUFDQSw2QkFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7RUFDQSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0EsV0FBQTtBQUNGOztBQUVBO0VBQ0UsYUFBQTtFQUNBLHVCQUFBO0VBQ0EsY0FBQTtFQUNBLG1CQUFBO0FBQ0Y7O0FBRUE7RUFDRSxVQUFBO0VBQ0EsZ0JBQUE7QUFDRiIsImZpbGUiOiJpZGVudGl0eS1lbWFpbC1jb25maXJtYXRpb24ucGFnZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmhhc0VtYWlsIHtcbiAgZGlzcGxheTogZmxleDtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgdGV4dC1hbGlnbjogY2VudGVyO1xuICBtYXJnaW46IDNlbSAwIDZlbSAwO1xuICBmb250LXNpemU6IDEuMWVtO1xuICB3aWR0aDogMTAwJTtcbn1cblxuLmJ1dHRvbi1ob2xkZXIuZm9vdGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIG1hcmdpbjogMCBhdXRvO1xuICBwYWRkaW5nLWJvdHRvbTogMmVtO1xufVxuXG4uYnRuX2RlZmF1bHQge1xuICB3aWR0aDogNDAlO1xuICBmb250LXdlaWdodDogODAwO1xufVxuIl19 */"]
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 91056:
|
|
/*!******************************************************************************!*\
|
|
!*** ./src/app/shared/services/init.register.has-company.storage.service.ts ***!
|
|
\******************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "InitRegisterHasCompanyStorageService": () => (/* binding */ InitRegisterHasCompanyStorageService)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _simple_storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.storage.service */ 19725);
|
|
|
|
|
|
|
|
class InitRegisterHasCompanyStorageService {
|
|
constructor(simpleStorageService) {
|
|
this.simpleStorageService = simpleStorageService;
|
|
this.KEY = 'REGISTER_HAS_COMPANY';
|
|
this.cache = null; // Cache em memória opcional
|
|
}
|
|
|
|
set(data) {
|
|
this.simpleStorageService.set(this.KEY, data);
|
|
this.cache = data; // Atualiza o cache
|
|
}
|
|
|
|
get() {
|
|
const data = this.simpleStorageService.get(this.KEY);
|
|
this.cache = data; // Atualiza o cache
|
|
|
|
return data;
|
|
}
|
|
|
|
remove() {
|
|
var _this = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
_this.simpleStorageService.remove(_this.KEY);
|
|
|
|
_this.cache = null; // Limpa o cache
|
|
})();
|
|
}
|
|
|
|
}
|
|
|
|
InitRegisterHasCompanyStorageService.ɵfac = function InitRegisterHasCompanyStorageService_Factory(t) {
|
|
return new (t || InitRegisterHasCompanyStorageService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_simple_storage_service__WEBPACK_IMPORTED_MODULE_2__.SimpleStorageService));
|
|
};
|
|
|
|
InitRegisterHasCompanyStorageService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
|
|
token: InitRegisterHasCompanyStorageService,
|
|
factory: InitRegisterHasCompanyStorageService.ɵfac,
|
|
providedIn: 'root'
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 19725:
|
|
/*!***********************************************************!*\
|
|
!*** ./src/app/shared/services/simple.storage.service.ts ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "SimpleStorageService": () => (/* binding */ SimpleStorageService)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
class SimpleStorageService {
|
|
constructor() { }
|
|
set(key, value) {
|
|
localStorage.setItem(key, JSON.stringify(value));
|
|
}
|
|
get(key) {
|
|
const item = JSON.parse(localStorage.getItem(key));
|
|
return item ?? null;
|
|
}
|
|
remove(key) {
|
|
localStorage.removeItem(key);
|
|
}
|
|
clear() {
|
|
localStorage.clear();
|
|
}
|
|
}
|
|
SimpleStorageService.ɵfac = function SimpleStorageService_Factory(t) { return new (t || SimpleStorageService)(); };
|
|
SimpleStorageService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: SimpleStorageService, factory: SimpleStorageService.ɵfac, providedIn: 'root' });
|
|
|
|
|
|
/***/ })
|
|
|
|
}])
|
|
//# sourceMappingURL=2268.js.map
|