zignal-stencil-library 1.1.129 → 1.1.131
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/{autocomplete-address_43.cjs.entry.js → autocomplete-address_44.cjs.entry.js} +576 -108
- package/dist/cjs/{dayjs-Btww0IBx.js → dayjs-Dqe_coVK.js} +11 -3
- package/dist/cjs/{index-REEdj4HR.js → index-BcnTODbr.js} +7 -0
- package/dist/cjs/{index-DBliBGHU.js → index-E5Wxua8O.js} +78 -4
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/quick-message-app.cjs.entry.js +5 -5
- package/dist/cjs/zignal-stencil-library.cjs.js +2 -2
- package/dist/collection/api/index.js +51 -0
- package/dist/collection/assets/images/logo/zerva.png +0 -0
- package/dist/collection/assets/images/logo/zrmz.png +0 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/autocomplete-address/autocomplete-address.css +1 -1
- package/dist/collection/components/autocomplete-multiple-select/autocomplete-multiple-select.css +1 -1
- package/dist/collection/components/autocomplete-multiple-select/autocomplete-multiple-select.js +1 -1
- package/dist/collection/components/autocomplete-select/autocomplete-select.css +1 -1
- package/dist/collection/components/autocomplete-select/autocomplete-select.js +23 -3
- package/dist/collection/components/channel-box/channel-box.css +1 -1
- package/dist/collection/components/chat-app/chat-app.css +1 -1
- package/dist/collection/components/chat-header/chat-header.css +1 -1
- package/dist/collection/components/chat-input/chat-input.css +1 -1
- package/dist/collection/components/checkbox-list/checkbox-list.css +1 -1
- package/dist/collection/components/dialog-bill-editor/dialog-bill-editor.css +1 -1
- package/dist/collection/components/dialog-custom-filter/dialog-custom-filter.css +1 -0
- package/dist/collection/components/dialog-custom-filter/dialog-custom-filter.js +101 -0
- package/dist/collection/components/dialog-editor/dialog-editor.css +1 -1
- package/dist/collection/components/dialog-editor/dialog-editor.js +1 -1
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.css +1 -1
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.js +1 -1
- package/dist/collection/components/dialog-search/dialog-search.css +1 -1
- package/dist/collection/components/dialog-search/dialog-search.js +209 -16
- package/dist/collection/components/internal-component/icon.js +3 -1
- package/dist/collection/components/internal-component/z-button.js +19 -4
- package/dist/collection/components/internal-component/z-input.js +1 -1
- package/dist/collection/components/menu-chat-channel/menu-chat-channel.css +1 -1
- package/dist/collection/components/menu-chat-channel/menu-chat-channel.js +2 -2
- package/dist/collection/components/menu-chat-type/menu-chat-type.css +1 -1
- package/dist/collection/components/menu-chat-type/menu-chat-type.js +29 -3
- package/dist/collection/components/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu-list/menu-list.js +2 -2
- package/dist/collection/components/message-box/message-box.css +1 -1
- package/dist/collection/components/message-box/message-box.js +1 -1
- package/dist/collection/components/message-content/message-content.css +1 -1
- package/dist/collection/components/message-content/message-content.js +1 -1
- package/dist/collection/components/message-item/message-item.css +1 -1
- package/dist/collection/components/message-item/message-item.js +1 -1
- package/dist/collection/components/message-media/message-media.css +1 -1
- package/dist/collection/components/message-media/message-media.js +2 -2
- package/dist/collection/components/profile-history/profile-history.css +1 -1
- package/dist/collection/components/profile-history/profile-history.js +1 -1
- package/dist/collection/components/profile-info/profile-info.css +1 -1
- package/dist/collection/components/profile-info/user-info-section.js +4 -4
- package/dist/collection/components/profile-media/profile-media.css +1 -1
- package/dist/collection/components/profile-media/profile-media.js +1 -1
- package/dist/collection/components/profile-tabs/profile-tabs.css +1 -1
- package/dist/collection/components/profile-tabs/profile-tabs.js +2 -2
- package/dist/collection/components/quick-message-add-template/quick-message-add-template.css +1 -1
- package/dist/collection/components/quick-message-add-template/quick-message-add-template.js +3 -3
- package/dist/collection/components/quick-message-add-template/quick-message-text-content.js +1 -1
- package/dist/collection/components/quick-message-app/quick-message-app.css +1 -1
- package/dist/collection/components/quick-message-app/quick-message-app.js +1 -1
- package/dist/collection/components/quick-message-file/quick-message-file.css +1 -1
- package/dist/collection/components/quick-message-file/quick-message-file.js +1 -1
- package/dist/collection/components/quick-message-image/quick-message-image.css +1 -1
- package/dist/collection/components/quick-message-image/quick-message-image.js +1 -1
- package/dist/collection/components/quick-message-modal/quick-message-modal.css +1 -1
- package/dist/collection/components/quick-message-modal/quick-message-modal.js +1 -1
- package/dist/collection/components/quick-message-template/quick-message-template.css +1 -1
- package/dist/collection/components/quick-message-template/quick-message-template.js +2 -2
- package/dist/collection/components/search-box/search-box.css +1 -1
- package/dist/collection/components/search-box/search-box.js +64 -9
- package/dist/collection/components/status-badge/status-badge.css +1 -1
- package/dist/collection/components/status-badge/status-badge.js +2 -2
- package/dist/collection/components/tag-list/tag-list.css +1 -1
- package/dist/collection/components/tag-list/tag-list.js +1 -1
- package/dist/collection/components/tag-or-status-item/tag-or-status-item.css +1 -1
- package/dist/collection/components/tag-or-status-item/tag-or-status-item.js +2 -2
- package/dist/collection/components/tag-popper/tag-popper.css +1 -1
- package/dist/collection/components/tag-popper/tag-popper.js +2 -2
- package/dist/collection/components/typography-clamp/typography-clamp.css +1 -1
- package/dist/collection/components/typography-clamp/typography-clamp.js +2 -2
- package/dist/collection/components/z-avatar/z-avatar.css +1 -1
- package/dist/collection/components/z-dialog/z-dialog.css +1 -1
- package/dist/collection/store/chat.js +102 -2
- package/dist/collection/store/store.js +8 -1
- package/dist/components/autocomplete-address.js +1 -1
- package/dist/components/autocomplete-multiple-select.js +1 -1
- package/dist/components/autocomplete-select.js +1 -1
- package/dist/components/channel-box.js +1 -1
- package/dist/components/chat-app.js +63 -58
- package/dist/components/chat-header.js +1 -1
- package/dist/components/chat-input.js +1 -1
- package/dist/components/checkbox-list.js +1 -1
- package/dist/components/dialog-bill-editor.js +1 -1
- package/dist/components/dialog-custom-filter.d.ts +11 -0
- package/dist/components/dialog-custom-filter.js +6 -0
- package/dist/components/dialog-editor.js +1 -1
- package/dist/components/dialog-preview-media.js +1 -1
- package/dist/components/dialog-search.js +1 -1
- package/dist/components/index.js +2270 -5
- package/dist/components/menu-chat-channel.js +1 -1
- package/dist/components/menu-chat-type.js +1 -1
- package/dist/components/menu-list.js +1 -1
- package/dist/components/message-box.js +1 -1
- package/dist/components/message-content.js +1 -1
- package/dist/components/message-item.js +1 -1
- package/dist/components/message-media.js +1 -1
- package/dist/components/p-0FvHc-B5.js +308 -0
- package/dist/components/p-6aA6IXgE.js +515 -0
- package/dist/components/p-8LUpPeMC.js +121 -0
- package/dist/components/p-B--0UJ8Q.js +701 -0
- package/dist/components/p-B21KTEyo.js +233 -0
- package/dist/components/{p-BkFRrRKV.js → p-B47YNDih.js} +2 -2
- package/dist/components/{p-Bu7d3mrb.js → p-B4Cfocp9.js} +3 -3
- package/dist/components/p-B9fXhpga.js +155 -0
- package/dist/components/p-BDJJTGOU.js +135 -0
- package/dist/components/p-BDxpdg-N.js +231 -0
- package/dist/components/p-BI-UoISS.js +166 -0
- package/dist/components/p-BN3dsmNi.js +76 -0
- package/dist/components/p-BNAd9VOs.js +35 -0
- package/dist/components/p-BRKzV_qr.js +119 -0
- package/dist/components/{p-CEHfgumC.js → p-BT_WpMsl.js} +3 -3
- package/dist/components/p-BWShYY6x.js +129 -0
- package/dist/components/p-BYRd-ETx.js +51 -0
- package/dist/components/p-BcwS8hPe.js +57 -0
- package/dist/components/p-Bdlu4rso.js +223 -0
- package/dist/components/{p-DoSaXyw1.js → p-BdvA9NEC.js} +1 -1
- package/dist/components/p-BhCoO4f3.js +308 -0
- package/dist/components/p-BopDIDXn.js +108 -0
- package/dist/components/p-BpASk0tX.js +184 -0
- package/dist/components/{p-DvuE0BKi.js → p-BqOIOKFi.js} +2 -2
- package/dist/components/{p-DAdBAzUE.js → p-BrOdZv7V.js} +1 -1
- package/dist/components/p-BydrhdC7.js +175 -0
- package/dist/components/p-C4u7E9_t.js +96 -0
- package/dist/components/p-C71aADT1.js +121 -0
- package/dist/components/p-C7s-XcB7.js +265 -0
- package/dist/components/p-CEPL38dm.js +107 -0
- package/dist/components/p-CGTVfhQb.js +215 -0
- package/dist/components/p-CGc7F4KM.js +107 -0
- package/dist/components/p-CHSs9Ttf.js +175 -0
- package/dist/components/p-CJYhrgVu.js +563 -0
- package/dist/components/p-CJhbvCEH.js +98 -0
- package/dist/components/p-CKAFX0Iv.js +701 -0
- package/dist/components/p-CLXYWZlj.js +138 -0
- package/dist/components/p-CLlWrXTq.js +65 -0
- package/dist/components/{p-D3nAizga.js → p-CMDuo7hT.js} +2 -2
- package/dist/components/{p-Bt6e__iP.js → p-CNHOm1zC.js} +2 -2
- package/dist/components/{p-X0kRbis3.js → p-CNe_ZsVx.js} +56 -5
- package/dist/components/p-COcJs6mc.js +599 -0
- package/dist/components/p-CP6kAa06.js +155 -0
- package/dist/components/{p-C64OG6Go.js → p-CSjwRjNB.js} +3 -3
- package/dist/components/p-CURg_IlF.js +74 -0
- package/dist/components/p-CW-xBGZT.js +76 -0
- package/dist/components/p-CWHertSv.js +98 -0
- package/dist/components/p-CWiOAAbL.js +133 -0
- package/dist/components/{p-D6E7AT0Y.js → p-CXxNtcxg.js} +9 -2
- package/dist/components/p-C_lNjlP9.js +171 -0
- package/dist/components/p-CiJdh58e.js +166 -0
- package/dist/components/{p-ZODz3l7q.js → p-Ciltq84L.js} +4 -4
- package/dist/components/p-Ciw0N6KJ.js +554 -0
- package/dist/components/p-CjRQ8tWw.js +51 -0
- package/dist/components/{p-BRjNz6ke.js → p-Ck7Zzb_A.js} +3 -3
- package/dist/components/p-CkPghfKe.js +65 -0
- package/dist/components/p-CmU1kQfH.js +102 -0
- package/dist/components/p-CqEWDRGc.js +57 -0
- package/dist/components/p-CspaPELO.js +138 -0
- package/dist/components/p-CvoFnZ8_.js +122 -0
- package/dist/components/p-D3tPu5Y4.js +119 -0
- package/dist/components/p-D4gDJ3W1.js +32 -0
- package/dist/components/p-D6YiY6pP.js +155 -0
- package/dist/components/{p-CvZQgYYK.js → p-D93wPIC3.js} +1 -2
- package/dist/components/p-D9YlkO4-.js +599 -0
- package/dist/components/p-DDnZegDc.js +554 -0
- package/dist/components/p-DM5Sdblu.js +102 -0
- package/dist/components/p-DNR8IdgA.js +133 -0
- package/dist/components/p-DRgwUET0.js +223 -0
- package/dist/components/{p-rnwpU-MO.js → p-DWTlCCDm.js} +4 -4
- package/dist/components/{p-CTJvvlwf.js → p-DWeecZPp.js} +4 -4
- package/dist/components/p-DYIZvGP5.js +108 -0
- package/dist/components/p-DZj-fLD_.js +515 -0
- package/dist/components/p-D_oR-hBJ.js +156 -0
- package/dist/components/p-DfHPvUwh.js +122 -0
- package/dist/components/p-DfK17cYt.js +129 -0
- package/dist/components/{p-UNG2V2EJ.js → p-DgdZ-NpM.js} +1 -1
- package/dist/components/p-DiW_RB--.js +214 -0
- package/dist/components/p-DitKjbtM.js +171 -0
- package/dist/components/p-Djhy9K1-.js +215 -0
- package/dist/components/p-DmtUV4zq.js +231 -0
- package/dist/components/p-DoJtbC3R.js +563 -0
- package/dist/components/p-DvdxHjTt.js +74 -0
- package/dist/components/p-DxU_vY7A.js +265 -0
- package/dist/components/{p-BCLD-S_A.js → p-DyFFnt-x.js} +39 -0
- package/dist/components/{p-Cq-rMEH9.js → p-DygBeHqo.js} +3 -3
- package/dist/components/p-H4OQSs-h.js +214 -0
- package/dist/components/p-IaSLquNY.js +155 -0
- package/dist/components/p-SZeGyCdE.js +32 -0
- package/dist/components/p-YnD9y_Qu.js +578 -0
- package/dist/components/p-Z8XFPTBu.js +158 -0
- package/dist/components/p-cVjpVM7h.js +156 -0
- package/dist/components/p-dAfkDBvh.js +578 -0
- package/dist/components/p-ePQjUJ_9.js +158 -0
- package/dist/components/{p-CwmztnlQ.js → p-inmrc0Ir.js} +3 -3
- package/dist/components/p-lsx83h0R.js +96 -0
- package/dist/components/p-mQ8xbETj.js +184 -0
- package/dist/components/p-uJtpA8Ed.js +135 -0
- package/dist/components/profile-history.js +1 -1
- package/dist/components/profile-info.js +1 -1
- package/dist/components/profile-media.js +1 -1
- package/dist/components/profile-tabs.js +1 -1
- package/dist/components/quick-message-add-template.js +1 -1
- package/dist/components/quick-message-app.js +15 -16
- package/dist/components/quick-message-button-content.js +1 -1
- package/dist/components/quick-message-file.js +1 -1
- package/dist/components/quick-message-image-content.js +1 -1
- package/dist/components/quick-message-image.js +1 -1
- package/dist/components/quick-message-menu-list-content.js +1 -1
- package/dist/components/quick-message-modal.js +1 -1
- package/dist/components/quick-message-template.js +1 -1
- package/dist/components/quick-message-text-content.js +1 -1
- package/dist/components/quick-message-video-content.js +1 -1
- package/dist/components/search-box.js +1 -1
- package/dist/components/status-badge.js +1 -1
- package/dist/components/summarize-message-section.js +1 -1
- package/dist/components/tag-list.js +1 -1
- package/dist/components/tag-or-status-item.js +1 -1
- package/dist/components/tag-popper.js +1 -1
- package/dist/components/typography-clamp.js +1 -1
- package/dist/components/user-info-section.js +1 -1
- package/dist/components/z-avatar.js +1 -1
- package/dist/components/z-dialog.js +1 -1
- package/dist/esm/{autocomplete-address_43.entry.js → autocomplete-address_44.entry.js} +576 -109
- package/dist/esm/{dayjs-i8XfvNUE.js → dayjs-DpB2jvyJ.js} +11 -4
- package/dist/esm/{index-BsYB8kV0.js → index-CQZOvlmT.js} +78 -4
- package/dist/esm/{index-DrJU7-bz.js → index-SIpuloy-.js} +7 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/quick-message-app.entry.js +5 -5
- package/dist/esm/zignal-stencil-library.js +3 -3
- package/dist/types/api/index.d.ts +4 -0
- package/dist/types/api/type.d.ts +78 -0
- package/dist/types/components/autocomplete-select/autocomplete-select.d.ts +1 -0
- package/dist/types/components/dialog-custom-filter/dialog-custom-filter.d.ts +11 -0
- package/dist/types/components/dialog-search/dialog-search.d.ts +15 -2
- package/dist/types/components/internal-component/z-button.d.ts +2 -1
- package/dist/types/components/search-box/search-box.d.ts +11 -1
- package/dist/types/components.d.ts +47 -2
- package/dist/types/store/chat.d.ts +27 -1
- package/dist/types/store/store.d.ts +7 -1
- package/dist/zignal-stencil-library/assets/images/logo/zerva.png +0 -0
- package/dist/zignal-stencil-library/assets/images/logo/zrmz.png +0 -0
- package/dist/zignal-stencil-library/index.esm.js +1 -1
- package/dist/zignal-stencil-library/p-52e55e01.entry.js +1 -0
- package/dist/zignal-stencil-library/p-908d55d2.entry.js +2 -0
- package/dist/zignal-stencil-library/p-CQZOvlmT.js +1 -0
- package/dist/zignal-stencil-library/p-SIpuloy-.js +2 -0
- package/dist/zignal-stencil-library/p-e53feba0.entry.js +2 -0
- package/dist/zignal-stencil-library/p-yAsAdobv.js +1 -0
- package/dist/zignal-stencil-library/zignal-stencil-library.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p--2uPh98m.js +0 -173
- package/dist/components/p-4VtRaJ3s.js +0 -107
- package/dist/components/p-5oC4CRoP.js +0 -231
- package/dist/components/p-7jJKln0k.js +0 -155
- package/dist/components/p-B16voarw.js +0 -133
- package/dist/components/p-BFIFTMrY.js +0 -158
- package/dist/components/p-BGVN7Drg.js +0 -107
- package/dist/components/p-BH7MWaEm.js +0 -223
- package/dist/components/p-BQQE__zQ.js +0 -129
- package/dist/components/p-BTD3J3v6.js +0 -138
- package/dist/components/p-BX8sKLQ-.js +0 -148
- package/dist/components/p-BcnssswI.js +0 -32
- package/dist/components/p-BlDBX6wD.js +0 -133
- package/dist/components/p-Busq9xrD.js +0 -98
- package/dist/components/p-C9qH4kP3.js +0 -156
- package/dist/components/p-CBXm2OUy.js +0 -171
- package/dist/components/p-CHNajXFB.js +0 -701
- package/dist/components/p-CPZ9nOuH.js +0 -122
- package/dist/components/p-CW7_-hzK.js +0 -119
- package/dist/components/p-CdCDpC3-.js +0 -515
- package/dist/components/p-Cqfc6ySc.js +0 -135
- package/dist/components/p-D0Tke46Z.js +0 -121
- package/dist/components/p-D8-aPJYM.js +0 -74
- package/dist/components/p-DAoGutlB.js +0 -76
- package/dist/components/p-DPDx5rQM.js +0 -155
- package/dist/components/p-DaHmsqbO.js +0 -563
- package/dist/components/p-DcCoy5TC.js +0 -20
- package/dist/components/p-DhApSoyQ.js +0 -96
- package/dist/components/p-DhdQ-c2r.js +0 -214
- package/dist/components/p-Ds96RINY.js +0 -57
- package/dist/components/p-DxfQE8Dx.js +0 -108
- package/dist/components/p-Ij2dsIQ1.js +0 -2191
- package/dist/components/p-NqAhrUkX.js +0 -51
- package/dist/components/p-PjOxwy5b.js +0 -140
- package/dist/components/p-Wi-CJLal.js +0 -578
- package/dist/components/p-XNRZVnJm.js +0 -184
- package/dist/components/p-ZKLMD3_O.js +0 -102
- package/dist/components/p-fQie6nmM.js +0 -308
- package/dist/components/p-wiDfZE6o.js +0 -554
- package/dist/components/p-zreJIOvq.js +0 -599
- package/dist/zignal-stencil-library/p-9b4f0480.entry.js +0 -2
- package/dist/zignal-stencil-library/p-BsYB8kV0.js +0 -1
- package/dist/zignal-stencil-library/p-DZsPtXDQ.js +0 -1
- package/dist/zignal-stencil-library/p-DrJU7-bz.js +0 -2
- package/dist/zignal-stencil-library/p-c0c25f33.entry.js +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { Host, h, getAssetPath } from "@stencil/core";
|
|
2
2
|
import { ZButton } from "../internal-component/z-button";
|
|
3
3
|
import { ZInput } from "../internal-component/z-input";
|
|
4
4
|
import { configStore, filterChatsStore, responsiveStore } from "../../store/store";
|
|
5
|
-
import { handleGetUserStatuses, handleGetUserTags } from "../../store/chat";
|
|
5
|
+
import { handleCreateChatFilter, handleDeleteChatFilter, handleGetUserStatuses, handleGetUserTags, handleUpdateChatFilter, haveConnectionFromZwiz } from "../../store/chat";
|
|
6
6
|
import { useTranslation } from "../../utils/utils";
|
|
7
7
|
import { ZIconButton } from "../internal-component/z-icon-button";
|
|
8
|
+
import { openDialog } from "../../store/dialog";
|
|
9
|
+
import { Icon } from "../internal-component/icon";
|
|
10
|
+
import { t } from "i18next";
|
|
8
11
|
export class DialogSearch {
|
|
9
12
|
connectionList = configStore.get('connectionList').map(connection => ({
|
|
10
13
|
iconName: connection.type,
|
|
@@ -23,26 +26,85 @@ export class DialogSearch {
|
|
|
23
26
|
name: label,
|
|
24
27
|
};
|
|
25
28
|
});
|
|
29
|
+
verifySlipList = [
|
|
30
|
+
{ label: t('chat_filter.verify_slip'), value: 'total_completed_verify_slip' },
|
|
31
|
+
{ label: t('chat_filter.verify_slip_more_than'), value: 'total_completed_verify_slip_more_than' },
|
|
32
|
+
];
|
|
33
|
+
zrmzShopList = [
|
|
34
|
+
{ label: 'Shop1', value: 'shop1' },
|
|
35
|
+
{ label: 'Shop2', value: 'shop2' },
|
|
36
|
+
];
|
|
37
|
+
zervaShopList = [
|
|
38
|
+
{ label: 'Shop1', value: 'shop1' },
|
|
39
|
+
{ label: 'Shop2', value: 'shop2' },
|
|
40
|
+
];
|
|
26
41
|
defaultFilter = {
|
|
42
|
+
name: '',
|
|
27
43
|
search: '',
|
|
28
44
|
// spam: false,
|
|
29
|
-
read:
|
|
45
|
+
read: null,
|
|
46
|
+
type: null,
|
|
30
47
|
connectionIds: this.connectionList.map(connection => connection.value) || [],
|
|
31
48
|
lastAnswerByIds: this.answerList.map(answer => answer.value) || [],
|
|
32
49
|
statusIds: [],
|
|
33
50
|
tagIds: [],
|
|
51
|
+
verifySlip: null,
|
|
52
|
+
verifySlipValue: null,
|
|
53
|
+
zrmz: {
|
|
54
|
+
isOnlyCustomers: false,
|
|
55
|
+
shopId: null,
|
|
56
|
+
name: null,
|
|
57
|
+
email: null,
|
|
58
|
+
phoneNumber: null,
|
|
59
|
+
totalPointType: null,
|
|
60
|
+
totalPointMax: null,
|
|
61
|
+
totalPointMin: null,
|
|
62
|
+
remainingPointType: null,
|
|
63
|
+
remainingPointMax: null,
|
|
64
|
+
remainingPointMin: null,
|
|
65
|
+
},
|
|
66
|
+
zerva: {
|
|
67
|
+
isOnlyCustomers: false,
|
|
68
|
+
shopId: null,
|
|
69
|
+
bookingNo: null,
|
|
70
|
+
name: null,
|
|
71
|
+
email: null,
|
|
72
|
+
phoneNumber: null,
|
|
73
|
+
bookingStartDate: null,
|
|
74
|
+
bookingEndDate: null,
|
|
75
|
+
paymentStatus: null,
|
|
76
|
+
bookingStatus: null,
|
|
77
|
+
},
|
|
34
78
|
};
|
|
35
79
|
oldFilter;
|
|
80
|
+
filterType = 'advanced';
|
|
81
|
+
selectedFilter;
|
|
36
82
|
filter = this.defaultFilter;
|
|
83
|
+
isShowAdvancedZrmz = false;
|
|
84
|
+
isShowAdvancedZerva = false;
|
|
37
85
|
cancel;
|
|
38
86
|
search;
|
|
39
87
|
componentWillLoad() {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
const _filterType = filterChatsStore.get('filterType');
|
|
89
|
+
if (_filterType === 'advanced' && this.filterType === 'advanced') {
|
|
90
|
+
this.filter = {
|
|
91
|
+
...this.oldFilter
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
else if (this.filterType === 'custom' && this.selectedFilter) {
|
|
95
|
+
this.filter = {
|
|
96
|
+
name: this.selectedFilter.name,
|
|
97
|
+
search: this.selectedFilter.search,
|
|
98
|
+
read: this.selectedFilter.read ?? null,
|
|
99
|
+
type: this.selectedFilter.type ?? null,
|
|
100
|
+
connectionIds: this.selectedFilter.connection_ids,
|
|
101
|
+
lastAnswerByIds: this.selectedFilter.last_answer_by_ids,
|
|
102
|
+
statusIds: this.selectedFilter.status_ids,
|
|
103
|
+
tagIds: this.selectedFilter.tag_ids,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.filter = this.defaultFilter;
|
|
46
108
|
}
|
|
47
109
|
}
|
|
48
110
|
handleCancel = () => {
|
|
@@ -53,19 +115,105 @@ export class DialogSearch {
|
|
|
53
115
|
this.filter = { ...this.filter, [field]: value };
|
|
54
116
|
};
|
|
55
117
|
handleSubmit = () => {
|
|
118
|
+
filterChatsStore.set('filterType', 'advanced');
|
|
56
119
|
this.search.emit(this.filter);
|
|
57
120
|
};
|
|
58
121
|
handleReset = () => {
|
|
59
|
-
this.filter = this.defaultFilter;
|
|
122
|
+
this.filter = { ...this.defaultFilter, name: this.selectedFilter?.name || '' };
|
|
123
|
+
};
|
|
124
|
+
handleCreateCustomFilter = async () => {
|
|
125
|
+
const result = await handleCreateChatFilter({
|
|
126
|
+
...this.filter,
|
|
127
|
+
name: this.filter.name,
|
|
128
|
+
type: this.filter.type ?? null,
|
|
129
|
+
read: this.filter.read ?? null,
|
|
130
|
+
connection_ids: this.filter.connectionIds,
|
|
131
|
+
last_answer_by_ids: this.filter.lastAnswerByIds,
|
|
132
|
+
status_ids: this.filter.statusIds,
|
|
133
|
+
tag_ids: this.filter.tagIds,
|
|
134
|
+
});
|
|
135
|
+
if (result) {
|
|
136
|
+
this.cancel.emit();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
handleUpdateCustomFilter = async () => {
|
|
140
|
+
const result = await handleUpdateChatFilter({
|
|
141
|
+
...this.filter,
|
|
142
|
+
id: this.selectedFilter?.id,
|
|
143
|
+
name: this.filter.name,
|
|
144
|
+
type: this.filter.type ?? null,
|
|
145
|
+
read: this.filter.read ?? null,
|
|
146
|
+
connection_ids: this.filter.connectionIds,
|
|
147
|
+
last_answer_by_ids: this.filter.lastAnswerByIds,
|
|
148
|
+
status_ids: this.filter.statusIds,
|
|
149
|
+
tag_ids: this.filter.tagIds,
|
|
150
|
+
});
|
|
151
|
+
if (result) {
|
|
152
|
+
this.cancel.emit();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
handleDeleteCustomFilter = async () => {
|
|
156
|
+
const t = useTranslation();
|
|
157
|
+
const title = t('chat_filter.confirm_delete_filter') || 'Are you sure you want to delete this filter?';
|
|
158
|
+
openDialog({
|
|
159
|
+
open: true,
|
|
160
|
+
type: "WARNING" /* DIALOG_TYPE.WARNING */,
|
|
161
|
+
title,
|
|
162
|
+
buttonName: t('confirm'),
|
|
163
|
+
cancelButtonName: t('cancel'),
|
|
164
|
+
onSubmitDialog: () => {
|
|
165
|
+
handleDeleteChatFilter(this.selectedFilter?.id).then((result) => {
|
|
166
|
+
if (result) {
|
|
167
|
+
this.cancel.emit();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
onCloseDialog: () => {
|
|
172
|
+
// Dialog closed without confirmation
|
|
173
|
+
},
|
|
174
|
+
});
|
|
60
175
|
};
|
|
176
|
+
isEnableUpdateCustomFilter = () => {
|
|
177
|
+
const isNameChanged = this.filter.name !== this.selectedFilter?.name;
|
|
178
|
+
const isTypeChanged = this.filter.type !== this.selectedFilter?.type;
|
|
179
|
+
const isReadChanged = this.filter.read !== this.selectedFilter?.read;
|
|
180
|
+
const isSearchChanged = this.filter.search !== this.selectedFilter?.search;
|
|
181
|
+
// Helper function to check if arrays contain the same items regardless of order
|
|
182
|
+
const areArraysEqual = (arr1, arr2) => {
|
|
183
|
+
if (!arr1 && !arr2)
|
|
184
|
+
return true;
|
|
185
|
+
if (!arr1 || !arr2)
|
|
186
|
+
return false;
|
|
187
|
+
if (arr1.length !== arr2.length)
|
|
188
|
+
return false;
|
|
189
|
+
const set1 = new Set(arr1);
|
|
190
|
+
const set2 = new Set(arr2);
|
|
191
|
+
return arr1.every(item => set2.has(item)) && arr2.every(item => set1.has(item));
|
|
192
|
+
};
|
|
193
|
+
const isConnectionIdsChanged = !areArraysEqual(this.filter.connectionIds, this.selectedFilter?.connection_ids);
|
|
194
|
+
const isLastAnswerByIdsChanged = !areArraysEqual(this.filter.lastAnswerByIds, this.selectedFilter?.last_answer_by_ids);
|
|
195
|
+
const isStatusIdsChanged = !areArraysEqual(this.filter.statusIds, this.selectedFilter?.status_ids);
|
|
196
|
+
const isTagIdsChanged = !areArraysEqual(this.filter.tagIds, this.selectedFilter?.tag_ids);
|
|
197
|
+
return isNameChanged || isTypeChanged || isReadChanged || isSearchChanged || isConnectionIdsChanged || isLastAnswerByIdsChanged || isStatusIdsChanged || isTagIdsChanged;
|
|
198
|
+
};
|
|
199
|
+
renderZrmz() {
|
|
200
|
+
return h("div", null, h("img", { src: getAssetPath("assets/images/logo/zrmz.png"), alt: "zrmz", class: "h-[40px]" }), h("div", { class: "flex items-center gap-2" }, h("label", { class: "flex-1 inline-flex items-center gap-2 text-sm mt-1 text-surface" }, h("input", { type: "checkbox", checked: this.filter.zrmz?.isOnlyCustomers, onChange: () => this.handleChange('zrmz', { ...this.filter.zrmz, isOnlyCustomers: !this.filter.zrmz?.isOnlyCustomers }) }), h("span", null, t('chat_filter.only_customer_zrmz'))), h(ZButton, { label: t('chat_tab.advance_search'), variant: "text-underline", endIcon: h(Icon, { name: 'Triangle', addClass: `ml-1 size-1.5 fill-current ${this.isShowAdvancedZrmz ? 'rotate-0' : 'rotate-180'}` }), onClick: () => this.isShowAdvancedZrmz = !this.isShowAdvancedZrmz })), this.isShowAdvancedZrmz && h("div", { class: "flex flex-col" }, h("autocomplete-select", { value: this.zrmzShopList.find(item => item.value === this.filter.zrmz?.shopId)?.label, fetchItems: () => Promise.resolve(this.zrmzShopList.map(item => ({ name: item.label, value: item.value }))), onSelecting: item => this.handleChange('zrmz', { ...this.filter.zrmz, shopId: item.detail.value }), referenceSelector: "filter-zrmz-shop", showClearButton: true, placeholder: t('chat_filter.shop_name'), class: "mb-2" }), h(ZInput, { placeholder: t('chat_filter.name'), value: this.filter.zrmz?.name, onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, name: value }) }), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h(ZInput, { placeholder: t('quick_message.button_action_tel'), value: this.filter.zrmz?.phoneNumber, onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, phoneNumber: value }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: t('email'), value: this.filter.zrmz?.email, onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, email: value }) }))), h("p", { class: "text-sm mb-1 ml-1 text-surface" }, t('chat_filter.total_point')), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Point Type", value: this.filter.zrmz?.totalPointType, onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, totalPointType: value }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Min", value: this.filter.zrmz?.totalPointMin?.toString(), onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, totalPointMin: Number.parseInt(value) || 0 }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Max", value: this.filter.zrmz?.totalPointMax?.toString(), onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, totalPointMax: Number.parseInt(value) || 0 }) }))), h("p", { class: "text-sm mb-1 ml-1 text-surface" }, t('chat_filter.remaining_point')), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Point Type", value: this.filter.zrmz?.remainingPointType, onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, remainingPointType: value }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Min", value: this.filter.zrmz?.remainingPointMin?.toString(), onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, remainingPointMin: Number.parseInt(value) || 0 }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: "Max", value: this.filter.zrmz?.remainingPointMax?.toString(), onChange: value => this.handleChange('zrmz', { ...this.filter.zrmz, remainingPointMax: Number.parseInt(value) || 0 }) })))));
|
|
201
|
+
}
|
|
202
|
+
renderZerva() {
|
|
203
|
+
return (h("div", { class: "mt-1" }, h("img", { src: getAssetPath("assets/images/logo/zerva.png"), alt: "zerva", class: "h-[40px]" }), h("div", { class: "flex items-center gap-2" }, h("label", { class: "flex-1 inline-flex items-center gap-2 text-sm mt-1 text-surface" }, h("input", { type: "checkbox", checked: this.filter.zerva?.isOnlyCustomers, onChange: () => this.handleChange('zerva', { ...this.filter.zerva, isOnlyCustomers: !this.filter.zerva?.isOnlyCustomers }) }), h("span", null, t('chat_filter.only_customer_zerva'))), h(ZButton, { label: t('chat_tab.advance_search'), variant: "text-underline", endIcon: h(Icon, { name: 'Triangle', addClass: `ml-1 size-1.5 fill-current ${this.isShowAdvancedZerva ? 'rotate-0' : 'rotate-180'}` }), onClick: () => this.isShowAdvancedZerva = !this.isShowAdvancedZerva })), this.isShowAdvancedZerva && h("div", { class: "flex flex-col" }, h("autocomplete-select", { value: this.zervaShopList.find(item => item.value === this.filter.zerva?.shopId)?.label, fetchItems: () => Promise.resolve(this.zervaShopList.map(item => ({ name: item.label, value: item.value }))), onSelecting: item => this.handleChange('zerva', { ...this.filter.zerva, shopId: item.detail.value }), referenceSelector: "filter-zerva-shop", showClearButton: true, placeholder: t('chat_filter.shop_name'), class: "mb-2" }), h(ZInput, { placeholder: t('chat_filter.booking_no'), value: this.filter.zerva?.bookingNo, onChange: value => this.handleChange('zerva', { ...this.filter.zerva, bookingNo: value }) }), h(ZInput, { placeholder: t('chat_filter.name'), value: this.filter.zerva?.name, onChange: value => this.handleChange('zerva', { ...this.filter.zerva, name: value }) }), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h(ZInput, { placeholder: t('quick_message.button_action_tel'), value: this.filter.zerva?.phoneNumber, onChange: value => this.handleChange('zerva', { ...this.filter.zerva, phoneNumber: value }) })), h("div", { class: "flex-1" }, h(ZInput, { placeholder: t('email'), value: this.filter.zerva?.email, onChange: value => this.handleChange('zerva', { ...this.filter.zerva, email: value }) }))), h("p", { class: "text-sm mb-1 ml-1 text-surface" }, t('chat_filter.service_date')), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h(ZInput, { type: "date", placeholder: t('chat_filter.start_date'), value: this.filter.zerva?.bookingStartDate || '', onChange: value => this.handleChange('zerva', { ...this.filter.zerva, bookingStartDate: value }) })), h("div", { class: "flex-1" }, h(ZInput, { type: "date", placeholder: t('chat_filter.end_date'), value: this.filter.zerva?.bookingEndDate || '', onChange: value => this.handleChange('zerva', { ...this.filter.zerva, bookingEndDate: value }) }))), h("p", { class: "text-sm mb-1 ml-1 text-surface" }, t('status')), h("div", { class: "flex w-full gap-2" }, h("div", { class: "flex-1" }, h("autocomplete-select", { value: this.filter.zerva?.bookingStatus, fetchItems: () => Promise.resolve(this.zervaShopList.map(item => ({ name: item.label, value: item.value }))), onSelecting: item => this.handleChange('zerva', { ...this.filter.zerva, bookingStatus: item.detail.value }), referenceSelector: "filter-zerva-booking-status", showClearButton: true, placeholder: t('chat_filter.booking_status'), class: "mb-2" })), h("div", { class: "flex-1" }, h("autocomplete-select", { value: this.filter.zerva?.paymentStatus, fetchItems: () => Promise.resolve(this.zervaShopList.map(item => ({ name: item.label, value: item.value }))), onSelecting: item => this.handleChange('zerva', { ...this.filter.zerva, paymentStatus: item.detail.value }), referenceSelector: "filter-zerva-payment-status", showClearButton: true, placeholder: t('chat_filter.payment_status'), class: "mb-2" }))))));
|
|
204
|
+
}
|
|
61
205
|
render() {
|
|
62
206
|
const t = useTranslation();
|
|
63
207
|
const isMobile = responsiveStore.get('isMobile');
|
|
64
|
-
const selectReadOptions = [{ label: t('chat_tab.all_chat') }, { label: t('chat_tab.already_read'), value: true }, { label: t('chat_tab.unread'), value: false }];
|
|
65
|
-
|
|
208
|
+
const selectReadOptions = [{ label: t('chat_tab.all_chat'), value: null }, { label: t('chat_tab.already_read'), value: true }, { label: t('chat_tab.unread'), value: false }];
|
|
209
|
+
const selectChatTypeOptions = [{ label: t('chat_filter.all'), value: null }, { label: t('chat_filter.friend'), value: 'user' }, { label: t('chat_filter.group'), value: 'group' }];
|
|
210
|
+
return (h(Host, { key: '8644594cf5faf6d3a0f076c1b02fce9cc3c4b98b' }, h("div", { key: '23cac53ce2dadadedce3008653dcaa471c249bac', class: `dialog-search scroll-container ${isMobile ? 'w-xs' : 'w-xl'}` }, h("div", { key: '3365d371b9dcdfa8d11610d1ef3cd7b26c3fdf6e', class: "dialog-search-toolbar-action" }, h("div", { key: 'fd3b29cbb1dbe94d3763b531b13030e70fec1aee', class: "dialog-search-toolbar-action-wrapper " }, h("span", { key: '7cbe9070332e1621f431d7a908769605c29f90ec', class: "dialog-search-toolbar-action-reset", onClick: this.handleReset }, t('reset')), h(ZIconButton, { key: '3a9bf5ab45baea022ed76dac4845bbe7f011319c', iconName: "X", variant: "none", onClick: this.handleCancel }))), h("h2", { key: '304bbf73ae2ccfc38da9412b3301383c8346bc19', class: "dialog-search-toolbar-title" }, this.filterType === 'advanced' ? t('chat_tab.advanced_search') : this.selectedFilter ? t('chat_tab.edit_custom_filter') : t('chat_tab.add_custom_filter')), h("div", { key: 'fdebf9044ba42b4d0740082be568ff2a9f6785b0', class: "dialog-search-content" }, h("div", { key: '8d6547c2fb19ddd3c887ea4209d99bf696677067', class: "space-y-2" }, this.filterType === 'custom' && h("div", { key: '308e56f00399316090e3560f1dfab56c7cef057c' }, h("p", { key: '27083190a05134d95fdde02b51e92d032d483aa9', class: "dialog-search-text" }, t('chat_filter.filter_name'), "\u00A0"), h(ZInput, { key: 'c00e5e2ed4344ddd46859265819e8e85e6703f0e', placeholder: t('chat_filter.filter_name'), value: this.filter.name, onChange: value => this.handleChange('name', value) })), h("p", { key: '45d2b4232907d887f807bb62a32905228d737d7d', class: "dialog-search-text" }, t('search'), "\u00A0", h("span", { key: 'a08c8347639ea7b9c5433f3b0d9f04814981ea2f', class: "text-sm text-theme-gray" }, "(", t('chat_tab.filter_search_fields'), ")")), h(ZInput, { key: '22e49d48d88a1300d4b2104963659dac0ac0205a', placeholder: t('search'), value: this.filter.search, onChange: value => this.handleChange('search', value) }), h("p", { key: '74d6c21b3447d4219c6c0211dbd1f12ea2428a09', class: "dialog-search-text" }, t('chat_tab.read_status')), h("div", { key: '7dc1331a43908dd1f853fffe4942a1bc00e062af', class: "dialog-search-read-option" }, selectReadOptions.map(({ label, value }) => {
|
|
66
211
|
const isSelected = value === this.filter.read;
|
|
67
212
|
return h(ZButton, { variant: isSelected ? 'primary' : 'outlined', label: label, title: label, onClick: () => this.handleChange('read', value) });
|
|
68
|
-
})), h("p", { key: '
|
|
213
|
+
})), h("p", { key: 'e915f1dece80412a59ed2a00ea9fdd6c2aa45f82', class: "dialog-search-text" }, t('channel')), h("div", { key: '1817ca28feca0fb1038912ba07dabc38646070fa', class: 'mb-2', id: "filter-channel" }, h("autocomplete-multiple-select", { key: 'c43b6c45fbca77dcab93c733558db3121e45e0ab', selectedIds: this.filter.connectionIds, fetchItems: async () => Promise.resolve(this.connectionList), onSelecting: event => this.handleChange('connectionIds', event.detail), referenceSelector: "filter-channel" })), h("p", { key: '0ed787b83aac340abdfc66194f630056b2a540d1', class: "dialog-search-text" }, t('chat_tab.last_reply')), h("div", { key: 'ffa937b4aeb84c0f3f8b9cc142c4d93b2b519700', class: 'mb-2', id: "filter-last-answer" }, h("autocomplete-multiple-select", { key: '8ef7dfad6f32d21f048beeb33c6cb9e8cc70daff', selectedIds: this.filter.lastAnswerByIds, fetchItems: async () => Promise.resolve(this.answerList), onSelecting: event => this.handleChange('lastAnswerByIds', event.detail), referenceSelector: "filter-last-answer" })), h("p", { key: '58175b27737ed2883f3a932dfd445e6333e0d7a5', class: "dialog-search-text" }, t('chat_filter.type'), "\u00A0", h("span", { key: '938125c8c6715b39dbe60b05fca2e75347ed7c71', class: "text-sm text-theme-gray" }, "(", t('chat_filter.type_for_line_oa'), ")")), h("div", { key: '669d4180c706dcf3dcec91f03317d8e98cbb0fad', class: "dialog-search-read-option" }, selectChatTypeOptions.map(({ label, value }) => {
|
|
214
|
+
const isSelected = value === this.filter.type;
|
|
215
|
+
return h(ZButton, { variant: isSelected ? 'primary' : 'outlined', label: label, title: label, onClick: () => this.handleChange('type', value) });
|
|
216
|
+
})), h("p", { key: 'e162c67444ff6e60edb2911c10af4ad3ce681475', class: "dialog-search-text" }, t('status')), h("div", { key: '58e9021261df36546bd9c8a6bdbe0961fd5b4ee3', class: 'mb-2', id: "filter-status" }, h("autocomplete-multiple-select", { key: '50d42eb427e48849193625ff5b855ffe40e0e00f', selectedIds: this.filter.statusIds, fetchItems: handleGetUserStatuses, onSelecting: event => this.handleChange('statusIds', event.detail), referenceSelector: "filter-status" })), h("p", { key: '04c06903a2ab8cdcb5d3312790e171e4967b2ecf', class: "dialog-search-text" }, t('tag')), h("div", { key: '55bd2b3aa65dadf40aa421acd8d48d83f6261c63', class: 'mb-2', id: "filter-tag" }, h("autocomplete-multiple-select", { key: 'd07a260ae4198262f9e829f5456ecf1a3d95c553', selectedIds: this.filter.tagIds, fetchItems: handleGetUserTags, onSelecting: event => this.handleChange('tagIds', event.detail), referenceSelector: "filter-tag" })), haveConnectionFromZwiz() && (h(h.Fragment, null, h("p", { key: '2529a64f4a24670d762081dea80413d9239abeb7', class: "dialog-search-text" }, t('chat_filter.verify_slip')), h("div", { key: '583c6b50d61f0934199eedacec530c428a9bddb4', class: "flex mb-2 gap-2", id: "filter-verify-slip" }, h("autocomplete-select", { key: 'c1ebf7d7a6858924cbc29a26b89156db3ab607ba', class: "flex-1", value: this.verifySlipList.find(item => item.value === this.filter.verifySlip)?.label, fetchItems: () => Promise.resolve(this.verifySlipList.map(item => ({ name: item.label, value: item.value }))), onSelecting: item => this.handleChange('verifySlip', item.detail.value), referenceSelector: "filter-verify-slip", showClearButton: true }), h("div", { key: 'f321a97938474d058c969eef9769b81e12558d45', class: "w-1/4" }, h(ZInput, { key: '51fc25c43e234da4b552c0716422eb368c8fb12a', placeholder: t('chat_filter.quantity'), value: this.filter.verifySlipValue?.toString() || '', onChange: value => this.handleChange('verifySlipValue', Number.parseInt(value) || 0) })), h("p", { key: '5fd3d21883cdf200dca75fd353a7882d197184f7', class: "text-sm mt-2" }, t('chat_filter.times'))))), haveConnectionFromZwiz() && this.renderZrmz(), haveConnectionFromZwiz() && this.renderZerva())), this.filterType === 'advanced' && h("div", { key: 'f9cd50989761cb91f64094b8f2cc36ea1a187c5c', class: "dialog-search-action-wrapper" }, h(ZButton, { key: 'ae3ef5c554f6f1bbad56cc9e48fab5ae9c7555ba', label: t('search_data'), fullWidth: true, onClick: this.handleSubmit })), this.filterType === 'custom' && !this.selectedFilter && h("div", { key: '46665e28993d265701972ed98d421273cac14616', class: "dialog-search-action-wrapper" }, h(ZButton, { key: '2ba3ae3046e078116b001cba1827b12a49838e5a', label: t('chat_filter.add_custom_filter'), fullWidth: true, onClick: this.handleCreateCustomFilter, disabled: !this.filter.name })), this.filterType === 'custom' && this.selectedFilter && h("div", { key: 'de2b0a2ba48176239f9c8cfaa6930ebc2b3dd779', class: "dialog-search-action-wrapper" }, h(ZButton, { key: '92bbaedfe6ea480ba27a94ad8f35a5fc5ae1c8b0', label: t('save'), fullWidth: true, onClick: this.handleUpdateCustomFilter, disabled: !this.filter.name || !this.isEnableUpdateCustomFilter() }), h(ZButton, { key: 'dcd226e138c6ffb723bbe23976eed4730550492a', variant: 'text-underline', label: t('delete'), fullWidth: true, onClick: this.handleDeleteCustomFilter })))));
|
|
69
217
|
}
|
|
70
218
|
static get is() { return "dialog-search"; }
|
|
71
219
|
static get originalStyleUrls() {
|
|
@@ -85,7 +233,7 @@ export class DialogSearch {
|
|
|
85
233
|
"mutable": false,
|
|
86
234
|
"complexType": {
|
|
87
235
|
"original": "SearchChatsParams",
|
|
88
|
-
"resolved": "{ search?: string; spam?: boolean; read?: boolean; connectionIds?: string[]; lastAnswerByIds?: string[]; statusIds?: string[]; tagIds?: string[]; }",
|
|
236
|
+
"resolved": "{ name?: string; search?: string; spam?: boolean; type?: \"user\" | \"group\"; read?: boolean; context?: string; connectionIds?: string[]; lastAnswerByIds?: string[]; statusIds?: string[]; tagIds?: string[]; verifySlip?: string; verifySlipValue?: number; zrmz?: { isOnlyCustomers?: boolean; shopId?: string; name?: string; phoneNumber?: string; email?: string; totalPointType?: string; totalPointMin?: number; totalPointMax?: number; remainingPointType?: string; remainingPointMin?: number; remainingPointMax?: number; }; zerva?: { isOnlyCustomers?: boolean; shopId?: string; bookingNo?: string; name?: string; phoneNumber?: string; email?: string; bookingStartDate?: string; bookingEndDate?: string; paymentStatus?: string; bookingStatus?: string; }; }",
|
|
89
237
|
"references": {
|
|
90
238
|
"SearchChatsParams": {
|
|
91
239
|
"location": "import",
|
|
@@ -102,12 +250,57 @@ export class DialogSearch {
|
|
|
102
250
|
},
|
|
103
251
|
"getter": false,
|
|
104
252
|
"setter": false
|
|
253
|
+
},
|
|
254
|
+
"filterType": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "'quick' | 'advanced' | 'custom'",
|
|
259
|
+
"resolved": "\"advanced\" | \"custom\" | \"quick\"",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": false,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": ""
|
|
267
|
+
},
|
|
268
|
+
"getter": false,
|
|
269
|
+
"setter": false,
|
|
270
|
+
"reflect": false,
|
|
271
|
+
"attribute": "filter-type",
|
|
272
|
+
"defaultValue": "'advanced'"
|
|
273
|
+
},
|
|
274
|
+
"selectedFilter": {
|
|
275
|
+
"type": "unknown",
|
|
276
|
+
"mutable": false,
|
|
277
|
+
"complexType": {
|
|
278
|
+
"original": "ChatFilter",
|
|
279
|
+
"resolved": "{ id: string; name: string; search?: string; read?: boolean; type?: \"user\" | \"group\"; connection_ids?: string[]; last_answer_by_ids?: string[]; status_ids?: string[]; tag_ids?: string[]; created_at?: string; updated_at?: string; }",
|
|
280
|
+
"references": {
|
|
281
|
+
"ChatFilter": {
|
|
282
|
+
"location": "import",
|
|
283
|
+
"path": "../../api/type",
|
|
284
|
+
"id": "src/api/type.ts::ChatFilter"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": false,
|
|
289
|
+
"optional": true,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": ""
|
|
293
|
+
},
|
|
294
|
+
"getter": false,
|
|
295
|
+
"setter": false
|
|
105
296
|
}
|
|
106
297
|
};
|
|
107
298
|
}
|
|
108
299
|
static get states() {
|
|
109
300
|
return {
|
|
110
|
-
"filter": {}
|
|
301
|
+
"filter": {},
|
|
302
|
+
"isShowAdvancedZrmz": {},
|
|
303
|
+
"isShowAdvancedZerva": {}
|
|
111
304
|
};
|
|
112
305
|
}
|
|
113
306
|
static get events() {
|
|
@@ -138,7 +331,7 @@ export class DialogSearch {
|
|
|
138
331
|
},
|
|
139
332
|
"complexType": {
|
|
140
333
|
"original": "SearchChatsParams",
|
|
141
|
-
"resolved": "{ search?: string; spam?: boolean; read?: boolean; connectionIds?: string[]; lastAnswerByIds?: string[]; statusIds?: string[]; tagIds?: string[]; }",
|
|
334
|
+
"resolved": "{ name?: string; search?: string; spam?: boolean; type?: \"user\" | \"group\"; read?: boolean; context?: string; connectionIds?: string[]; lastAnswerByIds?: string[]; statusIds?: string[]; tagIds?: string[]; verifySlip?: string; verifySlipValue?: number; zrmz?: { isOnlyCustomers?: boolean; shopId?: string; name?: string; phoneNumber?: string; email?: string; totalPointType?: string; totalPointMin?: number; totalPointMax?: number; remainingPointType?: string; remainingPointMin?: number; remainingPointMax?: number; }; zerva?: { isOnlyCustomers?: boolean; shopId?: string; bookingNo?: string; name?: string; phoneNumber?: string; email?: string; bookingStartDate?: string; bookingEndDate?: string; paymentStatus?: string; bookingStatus?: string; }; }",
|
|
142
335
|
"references": {
|
|
143
336
|
"SearchChatsParams": {
|
|
144
337
|
"location": "import",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
// Import only icons actually used in the project (49 icons instead of 1000+)
|
|
3
|
-
import { ArrowDown, ArrowRight, Ban, Bot, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, CircleCheck, CircleMinus, CircleOff, CircleX, Edit, Ellipsis, EllipsisVertical, File, Folder, Globe, Image, ImageOff, Inbox, Info, Languages, Loader2, LoaderCircle, Mail, MailCheck, MailWarning, MessageSquareText, MoreVertical, Paperclip, Pencil, Pin, Play, Plus, Reply, RotateCw, Save, Search, Send, SlidersHorizontal, SquareMenu, Touchpad, Trash2, Triangle, TriangleAlert, Unlink, UserRound, UserSearch, UsersRound, X, } from "lucide";
|
|
3
|
+
import { ArrowDown, ArrowRight, Ban, Bot, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, CircleCheck, CircleMinus, CircleOff, CircleX, Edit, Ellipsis, EllipsisVertical, File, Folder, Globe, Image, ImageOff, Inbox, Info, Languages, Loader2, LoaderCircle, Mail, MailCheck, MailWarning, MessageSquareText, MoreVertical, Paperclip, Pencil, Pin, Play, Plus, Reply, RotateCw, Save, Search, Send, SlidersHorizontal, SquareMenu, Touchpad, Trash2, Triangle, TriangleAlert, Unlink, UserRound, UserSearch, UsersRound, X, BotMessageSquare, Filter, } from "lucide";
|
|
4
4
|
// Icon map for tree-shaking - only includes icons actually used
|
|
5
5
|
const iconMap = {
|
|
6
6
|
ArrowDown,
|
|
@@ -56,6 +56,8 @@ const iconMap = {
|
|
|
56
56
|
UserSearch,
|
|
57
57
|
UsersRound,
|
|
58
58
|
X,
|
|
59
|
+
BotMessageSquare,
|
|
60
|
+
Filter,
|
|
59
61
|
};
|
|
60
62
|
export const Icon = ({ name, addClass }) => {
|
|
61
63
|
const icon = iconMap[name];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const ZButton = ({ id, variant = 'primary', textVariant = 'primary', disabled = false, onClick, fullWidth, maxWidth, label, startIcon, endIcon, size = 'medium', ref, title, }) => {
|
|
2
|
+
export const ZButton = ({ id, variant = 'primary', textVariant = 'primary', disabled = false, onClick, fullWidth, maxWidth, label, startIcon, endIcon, size = 'medium', ref, title, padding, }) => {
|
|
3
3
|
let styleSize = 'z-button-medium';
|
|
4
4
|
if (size === 'small') {
|
|
5
5
|
styleSize = 'z-button-small';
|
|
@@ -7,11 +7,26 @@ export const ZButton = ({ id, variant = 'primary', textVariant = 'primary', disa
|
|
|
7
7
|
if (size === 'large') {
|
|
8
8
|
styleSize = 'z-button-large';
|
|
9
9
|
}
|
|
10
|
-
const base = `z-button ${styleSize} ${fullWidth ? 'w-full' : maxWidth ? maxWidth : ''}`;
|
|
10
|
+
const base = `z-button ${padding} ${styleSize} ${fullWidth ? 'w-full' : maxWidth ? maxWidth : ''}`;
|
|
11
11
|
const primary = 'z-button-primary';
|
|
12
12
|
const outlined = 'z-button-outlined';
|
|
13
13
|
const text = `${textVariant === 'primary' ? 'text-primary' : 'text-surface'} hover:brightness-110`;
|
|
14
|
+
const textUnderline = `${textVariant === 'primary' ? 'text-primary' : 'text-surface'} hover:brightness-110 underline`;
|
|
14
15
|
const disabledStyle = 'z-button-disabled';
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
let variantClass;
|
|
17
|
+
if (variant === 'primary') {
|
|
18
|
+
variantClass = primary;
|
|
19
|
+
}
|
|
20
|
+
else if (variant === 'outlined') {
|
|
21
|
+
variantClass = outlined;
|
|
22
|
+
}
|
|
23
|
+
else if (variant === 'text-underline') {
|
|
24
|
+
variantClass = textUnderline;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
variantClass = text;
|
|
28
|
+
}
|
|
29
|
+
const disabledClass = disabled ? disabledStyle : '';
|
|
30
|
+
const classList = [base, variantClass, disabledClass].filter(Boolean).join(' ');
|
|
31
|
+
return (h("button", { id: id, title: title, ref: ref, class: classList, disabled: disabled, onClick: e => !disabled && onClick?.(e) }, startIcon, label && h("span", { class: "z-button-text", id: id }, label), endIcon));
|
|
17
32
|
};
|
|
@@ -2,5 +2,5 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { configStore } from "../../store/store";
|
|
3
3
|
export const ZInput = ({ id, label, placeholder = '', value = '', onChange, onKeyDown, autoFocus, type = 'text', error }) => {
|
|
4
4
|
const theme = configStore.get('theme');
|
|
5
|
-
return (h("div", { class: "mb-
|
|
5
|
+
return (h("div", { class: "mb-2", "data-theme": theme }, label && h("label", { class: "z-input-label" }, label), h("input", { id: id, type: type, placeholder: placeholder, class: "z-input", value: value, onInput: (e) => onChange?.(e.target.value), onKeyDown: onKeyDown, autoFocus: autoFocus }), error && h("p", { class: "z-input-error" }, error)));
|
|
6
6
|
};
|