crmbonus-component-wake 0.0.23 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/crmbonus-component-wake/app-modal.entry.js +1 -1
- package/dist/crmbonus-component-wake/crm-bonus-form.entry.js +2 -2
- package/dist/crmbonus-component-wake/crm-bonus-form.entry.js.map +1 -1
- package/dist/crmbonus-component-wake/crm-bonus.entry.js +2 -2
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/{crmbonus.service-04472105.js → crmbonus.service-5208f883.js} +6 -3
- package/dist/crmbonus-component-wake/crmbonus.service-5208f883.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-finish.entry.js +1 -1
- package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +1 -1
- package/dist/crmbonus-component-wake/giftback-pin.entry.js +1 -1
- package/dist/crmbonus-component-wake/giftback-progress.entry.js +1 -1
- package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +1 -1
- package/dist/crmbonus-component-wake/loading-spinner.entry.js +1 -1
- package/dist/crmbonus-component-wake/pedido-finalizado.entry.js +11 -3
- package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +1 -1
- package/dist/crmbonus-component-wake/phone-input-mask.entry.js +1 -1
- package/dist/crmbonus-component-wake/phone-input.entry.js +1 -1
- package/dist/types/components/pedido/pedido.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/dto/update.order.dto.d.ts +5 -0
- package/dist/types/services/crmbonus.service.d.ts +2 -1
- package/package.json +1 -1
- package/dist/crmbonus-component-wake/crmbonus.service-04472105.js.map +0 -1
@@ -13,7 +13,7 @@ const AppModal = class {
|
|
13
13
|
this.modalClosed.emit();
|
14
14
|
}
|
15
15
|
render() {
|
16
|
-
return (h("div", { key: '
|
16
|
+
return (h("div", { key: '79a05f7255e9d7d030288f368b612ab4c774a5a4', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '379ec6d0205898d1bd4974b31d7fcb76b0d0db1b', class: "modal" }, h("div", { key: 'd2bcc76c3414d603fb361bc4f19a4869977a62c7', class: "modal-header" }, h("h3", { key: 'f24d6813f0cd4a0ab24ddc44a243ba874b3e4427' }, this.modalTitle), h("button", { key: '738063580dccc0677ecc1352bd3fd96e48f6e342', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '1195516afc289ac2ded0688fa749369e5d1d4f53', class: "modal-body" }, h("slot", { key: '33284d5c981590c40db2de2d105de8af788fa95b' })))));
|
17
17
|
}
|
18
18
|
};
|
19
19
|
AppModal.style = appModalCss;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h, e as Host } from './index-f557ce7c.js';
|
2
|
-
import { C as CrmBonusService } from './crmbonus.service-
|
2
|
+
import { C as CrmBonusService } from './crmbonus.service-5208f883.js';
|
3
3
|
|
4
4
|
var StepFormEnum;
|
5
5
|
(function (StepFormEnum) {
|
@@ -99,7 +99,7 @@ const CrmBonusForm = class {
|
|
99
99
|
this.cancel();
|
100
100
|
}
|
101
101
|
render() {
|
102
|
-
return (h(Host, { key: '
|
102
|
+
return (h(Host, { key: '3be4b75b0ae2a8ad1cdda1717e7b464fdbf2144f' }, this.step === StepFormEnum.STEP_PHONE && h("phone-input", { key: '32c9afa5e7866ed4d534e1796f619ab3461fe6ae', value: this.customer.phone, sendPin: (phone) => this.sendPin(phone), loading: this.loading }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '5305fcb69fc27d84c98c8ad06cb0d368d19c13fe', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: 'ad58eda5507e90e17d4346195b6caa7a4309460a', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserve(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: 'e178cbe6553944ae87db1349b87a89bd8668e32d' }), h("p", { key: '7f49c0dbfe6d7a9bb2856a3a016513f8065647a0', class: "message-error" }, this.message)));
|
103
103
|
}
|
104
104
|
};
|
105
105
|
CrmBonusForm.style = crmBonusFormCss;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"crm-bonus-form.entry.esm.js","mappings":";;;AAAA,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,2DAAc,CAAA;IACd,uDAAY,CAAA;IACZ,+DAAgB,CAAA;IAChB,2DAAc,CAAA;AAClB,CAAC,EALW,YAAY,KAAZ,YAAY;;ACAxB,MAAM,eAAe,GAAG,sYAAsY;;MCWjZ,YAAY;;;QAEb,oBAAe,GAAoB,IAAI,eAAe,EAAE,CAAC;;;;wBAKnC;YAC1B,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;SACX;;uBAG2B,KAAK;oBAET,YAAY,CAAC,UAAU;;;;;;IAUxC,MAAM,OAAO,CAAC,KAAa;;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAElB,IAAI;YACA,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC5E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC;SACrC;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,OAAO,GAAG,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,IAAI,0CAAE,OAAO,CAAA;SAChD;gBAAS;YACN,IA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AC,OAAO,GAAG,qEAAqE,CAAA;SACvF;gBAAS;YACN,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACxB;KACJ;IAEM,YAAY;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,MAAM,EAAE,CAAA;KAChB;IAED,MAAM;QACF,QACI,EAAC,IAAI,uDACA,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,UAAU,IAAI,oEAAa,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,EACpJ,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,IAAI,qEAAc,MAAM,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,EAEhL,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,YAAY,IAAI,0EAAmB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,cAAsB,KAAK,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAI,EAChN,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,UAAU,IAAI,yEAAmB,EAC7D,0DAAG,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,EACV;KACJ;;;;;;","names":[],"sources":["src/contants/index.ts","src/components/crm-bonus-form/crm-bonus-form.css?tag=crm-bonus-form&encapsulation=shadow","src/components/crm-bonus-form/crm-bonus-form.tsx"],"sourcesContent":["export enum StepFormEnum {\n STEP_PHONE = 1,\n STEP_PIN = 2,\n STEP_RESERVE = 3,\n STEP_APPLY = 4\n}",".form-container {\n width: 100%;\n display: flex;\n justify-content: center;\n justify-content: space-around;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n}\n\n.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.message-error {\n color: #d11111;\n font-weight: bold;\n font-family: Arial;\n font-size: small;\n margin-left: 16px;\n}","import { Component, Host, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { IPinSent } from \"../../components\";\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { StepFormEnum } from \"../../contants\";\n\n@Component({\n tag: 'crm-bonus-form',\n styleUrl: 'crm-bonus-form.css',\n shadow: true\n})\nexport class CrmBonusForm {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n @Prop({ attribute: 'storename' }) storeName;\n @Prop() cartId;\n @Prop() products: Array<IProduct>;\n @Prop() customer: ICustomer = {\n phone: \"\",\n birthDate: \"\",\n document: \"\",\n name: \"\"\n };\n @Prop() cancel: () => void;\n\n @State() loading: boolean = false;\n\n @State() step: number = StepFormEnum.STEP_PHONE;\n\n @State() sent: IPinSent;\n\n @State() message: string;\n\n @State() phone: number;\n\n @State() bonus: IBonus;\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n const sent = await this.crmBonusService.sendPin(this.phone, this.storeName);\n this.sent = sent;\n this.step = StepFormEnum.STEP_PIN;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async validateBonus(pin: string) {\n this.loading = true;\n this.message = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: this.phone.toString(),\n loja_id: this.sent.storeId,\n user_id: this.sent.userId,\n cartId: this.cartId,\n products: this.products\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload, this.storeName);\n\n console.log('[this.bonus]', this.bonus);\n this.step = StepFormEnum.STEP_RESERVE;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false;\n }\n console.log('payload', payload)\n }\n\n public async reserve(amount: number) {\n this.loading = true;\n this.message = \"\";\n try {\n await this.crmBonusService.reserve({\n redeemed_bonus: amount,\n cart_id: this.cartId,\n ticket: this.cartId,\n gross_value: this.bonus.totalValue,\n }, this.storeName);\n\n this.step = StepFormEnum.STEP_APPLY;\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n } finally {\n this.loading = false;\n }\n }\n\n public handleCancel() {\n this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n render() {\n return (\n <Host>\n {this.step === StepFormEnum.STEP_PHONE && <phone-input value={this.customer.phone} sendPin={(phone) => this.sendPin(phone)} loading={this.loading} />}\n {this.step === StepFormEnum.STEP_PIN && <giftback-pin cancel={() => this.handleCancel()} sent={this.sent} validate={(data) => this.validateBonus(data)} loading={this.loading} />}\n\n {this.step === StepFormEnum.STEP_RESERVE && <giftback-progress loading={this.loading} cancel={() => this.handleCancel()} bonus={this.bonus} reserve={(amountRedeemed: number) => this.reserve(amountRedeemed)} />}\n {this.step === StepFormEnum.STEP_APPLY && <giftback-finish />}\n <p class=\"message-error\">{this.message}</p>\n </Host>\n )\n }\n}"],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h } from './index-f557ce7c.js';
|
2
|
-
import { C as CrmBonusService } from './crmbonus.service-
|
2
|
+
import { C as CrmBonusService } from './crmbonus.service-5208f883.js';
|
3
3
|
|
4
4
|
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL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AwMiA1OTAuNSA0NC4wMDAyQzU4MiA0NC4wMDAyIDU3Ny4zIDQ3LjEwMDIgNTc3LjMgNTEuODAwMkM1NzcuMyA1NS4zMDAyIDU3OS45IDU4LjgwMDIgNTg3LjcgNjAuMDAwMkw2MDAuMiA2Mi4wMDAyQzYxMC4zIDYzLjgwMDIgNjIwLjIgNjguMjAwMiA2MjAuMiA4MS4yMDAyQzYyMC4yIDk1LjMwMDIgNjA3LjkgMTAyLjUgNTkxLjEgMTAyLjVDNTc1LjMgMTAyLjUgNTYxLjkgOTYuMzAwMiA1NjAuMiA3OC43MDAyTDU3My44IDc4LjgwMDJDNTc1LjMgODcuMDAwMiA1ODEuNCA5MC41MDAyIDU5MS41IDkwLjUwMDJaIiBmaWxsPSJjdXJyZW50Q29sb3IiPjwvcGF0aD4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNjI5XzE4OCIgeDE9IjYzNi44MzMiIHkxPSI5Ny44MjYxIiB4Mj0iNzEzLjQ2IiB5Mj0iMjYuNjU4MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRjdBODMwIj48L3N0b3A+CjxzdG9wIG9mZnNldD0iMC42MzUzIiBzdG9wLWNvbG9yPSIjRjA4MzM2Ij48L3N0b3A+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0VBNTM0NiI+PC9zdG9wPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPg==';
|
5
5
|
|
@@ -39,7 +39,7 @@ const CrmBonus = class {
|
|
39
39
|
this.showModal = false;
|
40
40
|
}
|
41
41
|
render() {
|
42
|
-
return (h("div", { key: '
|
42
|
+
return (h("div", { key: '1f107deaddaba99f0a4e52b5b7e79c388a2bbd0c', class: "section-crm" }, h("div", { key: '7b6ccebbcb2b43576d687c193f1d07dd8083c872', class: "container-button" }, h("img", { key: '56e75da59433e55cde4ed3aa5edd4cfec3aa672c', src: logoSvg, onClick: () => (this.showModal = true) })), h("app-modal", { key: '6efdcc98325023202c9402219138ea917b6db1af', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: 'bcfd9bd62c2e48d2785127a79710b57d79e1ba2c', cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
|
43
43
|
}
|
44
44
|
static get assetsDirs() { return ["assets"]; }
|
45
45
|
};
|
@@ -43,7 +43,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
43
43
|
|
44
44
|
patchBrowser().then(async (options) => {
|
45
45
|
await globalScripts();
|
46
|
-
return bootstrapLazy([["crm-bonus",[[1,"crm-bonus",{"userId":[2,"userid"],"storeName":[8,"storename"],"productsInString":[1,"products"],"cartId":[8,"cartid"],"showModal":[32],"products":[32],"customer":[32]}]]],["pedido-finalizado",[[0,"pedido-finalizado",{"cartId":[1,"cartid"],"orderId":[2,"orderid"]}]]],["loading-spinner",[[1,"loading-spinner",{"size":[1],"color":[1]}]]],["phone-input",[[0,"phone-input",{"sendPin":[16],"loading":[4],"value":[1]}]]],["giftback-pin",[[1,"giftback-pin",{"sent":[16],"validate":[16],"cancel":[16],"loading":[4],"pin":[32],"isVerified":[32]}]]],["giftback-progress",[[1,"giftback-progress",{"loading":[4],"bonus":[16],"reserve":[16],"cancel":[16],"usedValue":[32]}]]],["giftback-finish",[[1,"giftback-finish"]]],["phone-input-mask",[[1,"phone-input-mask",{"initialValue":[1,"initial-value"],"phone":[32],"getPhone":[64]}]]],["crm-bonus-form",[[1,"crm-bonus-form",{"storeName":[8,"storename"],"cartId":[8,"cart-id"],"products":[16],"customer":[16],"cancel":[16],"loading":[32],"step":[32],"sent":[32],"message":[32],"phone":[32],"bonus":[32]}]]],["app-modal",[[1,"app-modal",{"isOpen":[516,"is-open"],"modalTitle":[1,"modal-title"]}]]]], options);
|
46
|
+
return bootstrapLazy([["crm-bonus",[[1,"crm-bonus",{"userId":[2,"userid"],"storeName":[8,"storename"],"productsInString":[1,"products"],"cartId":[8,"cartid"],"showModal":[32],"products":[32],"customer":[32]}]]],["pedido-finalizado",[[0,"pedido-finalizado",{"cartId":[1,"cartid"],"orderId":[2,"orderid"],"metadadoString":[1,"metadado"]}]]],["loading-spinner",[[1,"loading-spinner",{"size":[1],"color":[1]}]]],["phone-input",[[0,"phone-input",{"sendPin":[16],"loading":[4],"value":[1]}]]],["giftback-pin",[[1,"giftback-pin",{"sent":[16],"validate":[16],"cancel":[16],"loading":[4],"pin":[32],"isVerified":[32]}]]],["giftback-progress",[[1,"giftback-progress",{"loading":[4],"bonus":[16],"reserve":[16],"cancel":[16],"usedValue":[32]}]]],["giftback-finish",[[1,"giftback-finish"]]],["phone-input-mask",[[1,"phone-input-mask",{"initialValue":[1,"initial-value"],"phone":[32],"getPhone":[64]}]]],["crm-bonus-form",[[1,"crm-bonus-form",{"storeName":[8,"storename"],"cartId":[8,"cart-id"],"products":[16],"customer":[16],"cancel":[16],"loading":[32],"step":[32],"sent":[32],"message":[32],"phone":[32],"bonus":[32]}]]],["app-modal",[[1,"app-modal",{"isOpen":[516,"is-open"],"modalTitle":[1,"modal-title"]}]]]], options);
|
47
47
|
});
|
48
48
|
|
49
49
|
//# sourceMappingURL=crmbonus-component-wake.esm.js.map
|
package/dist/crmbonus-component-wake/{crmbonus.service-04472105.js → crmbonus.service-5208f883.js}
RENAMED
@@ -3841,8 +3841,11 @@ class CrmBonusService {
|
|
3841
3841
|
console.log('response.data', response.data);
|
3842
3842
|
return response.data;
|
3843
3843
|
}
|
3844
|
-
async updateOrder(
|
3845
|
-
const response = await this.axiosInstance.put(`/api/carts/update_cart/${cartId}`, {
|
3844
|
+
async updateOrder(updateOrderDTO) {
|
3845
|
+
const response = await this.axiosInstance.put(`/api/carts/update_cart/${updateOrderDTO.cartId}`, {
|
3846
|
+
orderId: updateOrderDTO.cartId,
|
3847
|
+
cartIdCrm: updateOrderDTO.cartIdCrm
|
3848
|
+
}, { headers: { 'Content-Type': 'application/json' } });
|
3846
3849
|
console.log('response', response.data);
|
3847
3850
|
}
|
3848
3851
|
async sendPin(phone, store) {
|
@@ -3865,4 +3868,4 @@ class CrmBonusService {
|
|
3865
3868
|
|
3866
3869
|
export { CrmBonusService as C };
|
3867
3870
|
|
3868
|
-
//# sourceMappingURL=crmbonus.service-
|
3871
|
+
//# sourceMappingURL=crmbonus.service-5208f883.js.map
|