@cling-se/widget 0.5.3 → 0.6.0
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/{DocFormSend.7f2914ae.js → DocFormSend.3454b646.js} +901 -632
- package/dist/{DocReceipt.7b70887a.js → DocReceipt.a6684947.js} +31 -31
- package/dist/DocSendReminder.06ea8eec.js +115 -0
- package/dist/{DocTimeline.359dea4f.js → DocTimeline.90191a9e.js} +82 -82
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +294 -286
- package/dist/{main.21e6cfa7.js → main.44d450fa.js} +32130 -32248
- package/package.json +1 -1
- package/stats.html +1 -1
- package/dist/DocSendReminder.688ee5e6.js +0 -102
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { d, f as c, h as l, n as r } from "./main.21e6cfa7.js";
|
|
2
|
-
const m = {
|
|
3
|
-
name: "DocumentSendReminderModal",
|
|
4
|
-
props: {
|
|
5
|
-
document: {
|
|
6
|
-
type: Object,
|
|
7
|
-
required: !0
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
clientsToSend: []
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
computed: {
|
|
16
|
-
...d({
|
|
17
|
-
feature: "application/feature"
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
created() {
|
|
21
|
-
const { events: n = [], clients: e = [] } = this.document || {}, s = n.reduce((t, { code: i, data: o }) => i === "sent" && o && o.clients && o.clients.length ? [...t, ...o.clients.map(({ id: a }) => a)] : t, []);
|
|
22
|
-
this.clientsToSend = e.filter(({ id: t }) => s.includes(t)), this.feature("sms") || this.clientsToSend.forEach((t, i) => {
|
|
23
|
-
this.isTypeActive("sms", t) && this.setDeliveryMethod("sms", i);
|
|
24
|
-
}), this.clientsToSend.forEach((t, i) => {
|
|
25
|
-
(!!t.answer || t.documentRole === "recipient") && ["sms", "email"].forEach((o) => {
|
|
26
|
-
this.isTypeActive(o, t) && this.setDeliveryMethod(o, i);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
...c({
|
|
32
|
-
sendDocumentReminder: l.SEND_REMINDER_DOCUMENT2
|
|
33
|
-
}),
|
|
34
|
-
async submit() {
|
|
35
|
-
await this.sendDocumentReminder({
|
|
36
|
-
id: this.document.id,
|
|
37
|
-
body: {
|
|
38
|
-
clients: this.clientsToSend
|
|
39
|
-
}
|
|
40
|
-
}), this.$emit("close");
|
|
41
|
-
},
|
|
42
|
-
canSendType(n, e) {
|
|
43
|
-
return !!e[n === "sms" ? "cellphone" : "email"];
|
|
44
|
-
},
|
|
45
|
-
isTypeActive(n, e) {
|
|
46
|
-
return e.deliveryTypes.includes(n) && this.canSendType(n, e);
|
|
47
|
-
},
|
|
48
|
-
setDeliveryMethod(n, e) {
|
|
49
|
-
const s = this.clientsToSend[e].deliveryTypes.findIndex((t) => t === n);
|
|
50
|
-
s > -1 ? this.clientsToSend[e].deliveryTypes.splice(s, 1) : this.clientsToSend[e].deliveryTypes.push(n);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
var u = function() {
|
|
55
|
-
var e = this, s = e._self._c;
|
|
56
|
-
return s("div", { staticClass: "bg-white rounded-xl p-8" }, [s("div", { staticClass: "mb-6 text-lg font-semibold", domProps: { textContent: e._s(e.$t("send", { thing: e.$t("reminder") })) } }), e._l(e.clientsToSend, function(t, i) {
|
|
57
|
-
return s("div", { key: i, staticClass: "border border-gray-200 p-2 rounded-lg mb-3" }, [s("div", { staticClass: "mb-2 pl-1" }, [s("div", { staticClass: "font-medium text-sm" }, [e._v(e._s(t.name || t.companyName))]), t.answer ? s("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("components:account.documentForm.send.reminders.alreadySigned").capitalize()) } }) : t.documentRole === "recipient" ? s("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("components:account.documentForm.send.reminders.cannotSign").capitalize()) } }) : e._e()]), s("div", { staticClass: "flex" }, [s("div", { staticClass: "py-1.5 pl-1.5 rounded-md bg-gray-100 border border-gray-200 items-center flex mr-2" }, [s("CCheckbox", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { ...!e.canSendType("sms", t) && { content: e.$t("missing", { thing: e.$t("phoneNumber") }) } }, expression: "{ ...(!canSendType('sms', client) && { content: $t('missing', { thing: $t('phoneNumber') }) }) }" }], staticClass: "font-medium mr-2", attrs: { value: e.isTypeActive("sms", t), size: "tiny", disabled: !e.feature("sms") || !e.canSendType("sms", t) }, on: { input: function(o) {
|
|
58
|
-
return e.setDeliveryMethod("sms", i);
|
|
59
|
-
} } }, [e._v(" " + e._s(e.$t("sms")) + " ")])], 1), s("div", { staticClass: "py-1.5 pl-1.5 pr-2.5 rounded-md bg-gray-100 border border-gray-200 items-center flex" }, [s("CCheckbox", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { ...!e.canSendType("email", t) && { content: e.$t("missing", { thing: e.$t("email") }) } }, expression: "{ ...(!canSendType('email', client) && { content: $t('missing', { thing: $t('email') }) }) }" }], staticClass: "font-medium", attrs: { value: e.isTypeActive("email", t), size: "tiny", disabled: !e.canSendType("email", t) }, on: { input: function(o) {
|
|
60
|
-
return e.setDeliveryMethod("email", i);
|
|
61
|
-
} } }, [e._v(" " + e._s(e.$t("email").capitalize()) + " ")])], 1)])]);
|
|
62
|
-
}), s("CButton", { staticClass: "font-semibold mt-8", attrs: { type: "secondary", size: "small", taller: "", icon: "send", wide: "" }, on: { click: e.submit } }, [e._v(" " + e._s(e.$t("send", { thing: e.$t("reminder") })) + " ")])], 2);
|
|
63
|
-
}, p = [], v = /* @__PURE__ */ r(
|
|
64
|
-
m,
|
|
65
|
-
u,
|
|
66
|
-
p,
|
|
67
|
-
!1,
|
|
68
|
-
null,
|
|
69
|
-
null,
|
|
70
|
-
null,
|
|
71
|
-
null
|
|
72
|
-
);
|
|
73
|
-
const y = v.exports, h = {
|
|
74
|
-
props: {
|
|
75
|
-
document: {
|
|
76
|
-
type: Object,
|
|
77
|
-
required: !0
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
components: {
|
|
81
|
-
DocumentSendReminderModal: y
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
var _ = function() {
|
|
85
|
-
var e = this, s = e._self._c;
|
|
86
|
-
return s("DocumentSendReminderModal", { attrs: { document: e.document }, on: { close: function(t) {
|
|
87
|
-
return e.$router.push("/");
|
|
88
|
-
} } });
|
|
89
|
-
}, f = [], T = /* @__PURE__ */ r(
|
|
90
|
-
h,
|
|
91
|
-
_,
|
|
92
|
-
f,
|
|
93
|
-
!1,
|
|
94
|
-
null,
|
|
95
|
-
null,
|
|
96
|
-
null,
|
|
97
|
-
null
|
|
98
|
-
);
|
|
99
|
-
const g = T.exports;
|
|
100
|
-
export {
|
|
101
|
-
g as default
|
|
102
|
-
};
|