@cling-se/widget 0.5.3 → 0.7.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.c9d155e8.js} +1098 -807
- package/dist/{DocReceipt.7b70887a.js → DocReceipt.f295022f.js} +31 -31
- package/dist/DocSendReminder.400202d0.js +115 -0
- package/dist/DocTimeline.3faeb01a.js +455 -0
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +296 -288
- package/dist/{main.21e6cfa7.js → main.e2cbf475.js} +32180 -32282
- package/package.json +1 -1
- package/stats.html +1 -1
- package/dist/DocSendReminder.688ee5e6.js +0 -102
- package/dist/DocTimeline.359dea4f.js +0 -378
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { f as g, h as p, n as u } from "./main.
|
|
1
|
+
import { f as g, h as p, n as u } from "./main.e2cbf475.js";
|
|
2
2
|
const _ = {
|
|
3
|
+
sv: {
|
|
4
|
+
title: "Verifikat p\xE5 signering",
|
|
5
|
+
waitingForSign: "V\xE4ntar p\xE5 signatur",
|
|
6
|
+
signMethod: "Signeringsmetod",
|
|
7
|
+
remaining: "{{count}} st signaturer kvarst\xE5r innan dokumentet \xE4r helt signerat.",
|
|
8
|
+
confirmChangeMessage: "Vill du verkligen byta signeringsmetod f\xF6r {{- name}}?",
|
|
9
|
+
bankIdHint: "Identifiering och signering s\xE4kerst\xE4lld med BankID."
|
|
10
|
+
},
|
|
11
|
+
en: {
|
|
12
|
+
title: "Signature verification",
|
|
13
|
+
waitingForSign: "Waiting for signature",
|
|
14
|
+
signMethod: "Sign method",
|
|
15
|
+
remaining: "{{count}} signatures are remaining before the document is completely signed.",
|
|
16
|
+
confirmChangeMessage: "Do you really want to change sign method for {{- name}}?",
|
|
17
|
+
bankIdHint: "Identity and signature confirmed with BankID"
|
|
18
|
+
}
|
|
19
|
+
}, f = {
|
|
3
20
|
name: "DocumentReceipt",
|
|
4
21
|
i18nOptions: {
|
|
5
|
-
namespaces: "
|
|
6
|
-
messages:
|
|
7
|
-
en: {
|
|
8
|
-
title: "Signature verification",
|
|
9
|
-
waitingForSign: "Waiting for signature",
|
|
10
|
-
signMethod: "Sign method",
|
|
11
|
-
remaining: "{{count}} signatures are remaining before the document is completely signed.",
|
|
12
|
-
confirmChangeMessage: "Do you really want to change sign method for {{- name}}?",
|
|
13
|
-
bankIdHint: "Identity and signature confirmed with BankID"
|
|
14
|
-
},
|
|
15
|
-
sv: {
|
|
16
|
-
title: "Verifikat p\xE5 signering",
|
|
17
|
-
waitingForSign: "V\xE4ntar p\xE5 signatur",
|
|
18
|
-
signMethod: "Signeringsmetod",
|
|
19
|
-
remaining: "{{count}} st signaturer kvarst\xE5r innan dokumentet \xE4r helt signerat.",
|
|
20
|
-
confirmChangeMessage: "Vill du verkligen byta signeringsmetod f\xF6r {{- name}}?",
|
|
21
|
-
bankIdHint: "Identifiering och signering s\xE4kerst\xE4lld med BankID."
|
|
22
|
-
}
|
|
23
|
-
}
|
|
22
|
+
namespaces: "documentReceipt",
|
|
23
|
+
messages: _
|
|
24
24
|
},
|
|
25
25
|
props: {
|
|
26
26
|
document: {
|
|
@@ -119,7 +119,7 @@ const _ = {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var x = function() {
|
|
123
123
|
var t = this, e = t._self._c;
|
|
124
124
|
return e("div", { staticClass: "rounded-lg text-gray-600 pt-4 px-1 pb-1 bg-gray-100 border border-gray-200" }, [e("div", { staticClass: "mb-1 relative leading-5" }, [e("div", { staticClass: "pl-4 pb-1" }, [e("div", { staticClass: "font-medium text-black" }, [t._v(t._s(t.$t("title")))]), e("div", { staticClass: "data-label" }, [t._v(t._s(t.documentName))]), e("div", { staticClass: "grid grid-cols-3 gap-2 pb-1 pt-4", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(200px, 1fr))" } }, [t._l([
|
|
125
125
|
[t.$t("_common:sentByName"), t.sentByName],
|
|
@@ -142,23 +142,23 @@ var f = function() {
|
|
|
142
142
|
"signature",
|
|
143
143
|
"inPerson"
|
|
144
144
|
], function(r) {
|
|
145
|
-
return e("CDropdownItem", { key: r, attrs: { "icon-right": n.method === r ? "check" : "" }, on: { click: function(
|
|
145
|
+
return e("CDropdownItem", { key: r, attrs: { "icon-right": n.method === r ? "check" : "" }, on: { click: function(w) {
|
|
146
146
|
n.method !== r && t.onUpdate(n, r);
|
|
147
147
|
} } }, [t._v(" " + t._s(t.$t(`_common:signMethod.${r}`)) + " ")]);
|
|
148
148
|
})], 2) : t._e()], 1)]) : t._e()];
|
|
149
|
-
})], 2)], 1), n.signatureDataURL ? e("div", { staticClass: "h-20 mx-4 border-t border-gray-100" }, [e("img", { staticClass: "h-full", attrs: { src: n.signatureDataURL } })]) : n.didAccept && n.method === "bankId" ? e("div", { staticClass: "bg-gray-300 mx-4 mb-4 text-white/90 flex items-center p-1.5 rounded-md", staticStyle: { background: "linear-gradient(45deg, hsl(200deg 35% 17%), hsl(199deg 25% 30%))", border: "1px solid #35677e" } }, [e("div", { staticClass: "rounded-md w-9 h-9 flex items-center justify-center mr-2 ml-0.5 bg-[#183e4f] border border-[#275369]" }, [e("BaseIcon", { attrs: { type: "bankId", size: "22" } })], 1), e("div", [e("div", { staticClass: "text-xs font-medium", domProps: { textContent: t._s(t.$t("bankIdHint")) } }), e("div", { staticClass: "text-xs opacity-70" }, [t._v(t._s(((c = n.response) == null ? void 0 : c.name) || n.name) + " \xB7 " + t._s(n.socialNo))])])]) : t._e()]);
|
|
149
|
+
})], 2)], 1), n.signatureDataURL ? e("div", { staticClass: "h-20 mx-4 py-6 border-t border-gray-100" }, [e("img", { staticClass: "h-full", attrs: { src: n.signatureDataURL } })]) : n.didAccept && n.method === "bankId" ? e("div", { staticClass: "bg-gray-300 mx-4 mb-4 text-white/90 flex items-center p-1.5 rounded-md", staticStyle: { background: "linear-gradient(45deg, hsl(200deg 35% 17%), hsl(199deg 25% 30%))", border: "1px solid #35677e" } }, [e("div", { staticClass: "rounded-md w-9 h-9 flex items-center justify-center mr-2 ml-0.5 bg-[#183e4f] border border-[#275369]" }, [e("BaseIcon", { attrs: { type: "bankId", size: "22" } })], 1), e("div", [e("div", { staticClass: "text-xs font-medium", domProps: { textContent: t._s(t.$t("bankIdHint")) } }), e("div", { staticClass: "text-xs opacity-70" }, [t._v(t._s(((c = n.response) == null ? void 0 : c.name) || n.name) + " \xB7 " + t._s(n.socialNo))])])]) : t._e()]);
|
|
150
150
|
}), 0)]);
|
|
151
|
-
},
|
|
152
|
-
_,
|
|
151
|
+
}, h = [], y = /* @__PURE__ */ u(
|
|
153
152
|
f,
|
|
154
153
|
x,
|
|
154
|
+
h,
|
|
155
155
|
!1,
|
|
156
156
|
null,
|
|
157
157
|
null,
|
|
158
158
|
null,
|
|
159
159
|
null
|
|
160
160
|
);
|
|
161
|
-
const b =
|
|
161
|
+
const b = y.exports, v = {
|
|
162
162
|
name: "DocReceipt",
|
|
163
163
|
components: {
|
|
164
164
|
DocumentReceipt: b
|
|
@@ -170,20 +170,20 @@ const b = h.exports, y = {
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
|
-
var
|
|
173
|
+
var C = function() {
|
|
174
174
|
var t = this, e = t._self._c;
|
|
175
175
|
return e("div", [e("DocumentReceipt", { attrs: { document: t.document, "allow-sign-method-update": !1 } })], 1);
|
|
176
|
-
},
|
|
177
|
-
y,
|
|
176
|
+
}, $ = [], k = /* @__PURE__ */ u(
|
|
178
177
|
v,
|
|
179
178
|
C,
|
|
179
|
+
$,
|
|
180
180
|
!1,
|
|
181
181
|
null,
|
|
182
182
|
null,
|
|
183
183
|
null,
|
|
184
184
|
null
|
|
185
185
|
);
|
|
186
|
-
const
|
|
186
|
+
const I = k.exports;
|
|
187
187
|
export {
|
|
188
|
-
|
|
188
|
+
I as default
|
|
189
189
|
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { d as m, f as c, h as d, n as a } from "./main.e2cbf475.js";
|
|
2
|
+
const l = {
|
|
3
|
+
name: "DocumentSendReminderModal",
|
|
4
|
+
i18nOptions: {
|
|
5
|
+
namespaces: "documentSendReminderModal",
|
|
6
|
+
messages: {
|
|
7
|
+
en: {
|
|
8
|
+
alreadySigned: "already signed",
|
|
9
|
+
cannotSign: "can't sign"
|
|
10
|
+
},
|
|
11
|
+
sv: {
|
|
12
|
+
alreadySigned: "har signerat",
|
|
13
|
+
cannotSign: "kan ej signera"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
document: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: !0
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
clientsToSend: []
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
...m({
|
|
30
|
+
feature: "application/feature"
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
created() {
|
|
34
|
+
const { events: s = [], clients: e = [] } = this.document || {}, n = s.reduce((t, { code: i, data: o }) => i === "sent" && o && o.clients && o.clients.length ? [...t, ...o.clients.map(({ id: r }) => r)] : t, []);
|
|
35
|
+
this.clientsToSend = e.filter(({ id: t }) => n.includes(t)), this.feature("sms") || this.clientsToSend.forEach((t, i) => {
|
|
36
|
+
this.isTypeActive("sms", t) && this.setDeliveryMethod("sms", i);
|
|
37
|
+
}), this.clientsToSend.forEach((t, i) => {
|
|
38
|
+
(!!t.answer || t.documentRole === "recipient") && ["sms", "email"].forEach((o) => {
|
|
39
|
+
this.isTypeActive(o, t) && this.setDeliveryMethod(o, i);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
...c({
|
|
45
|
+
sendDocumentReminder: d.SEND_REMINDER_DOCUMENT2
|
|
46
|
+
}),
|
|
47
|
+
async submit() {
|
|
48
|
+
await this.sendDocumentReminder({
|
|
49
|
+
id: this.document.id,
|
|
50
|
+
body: {
|
|
51
|
+
clients: this.clientsToSend
|
|
52
|
+
}
|
|
53
|
+
}), this.$emit("close");
|
|
54
|
+
},
|
|
55
|
+
canSendType(s, e) {
|
|
56
|
+
return !!e[s === "sms" ? "cellphone" : "email"];
|
|
57
|
+
},
|
|
58
|
+
isTypeActive(s, e) {
|
|
59
|
+
return e.deliveryTypes.includes(s) && this.canSendType(s, e);
|
|
60
|
+
},
|
|
61
|
+
setDeliveryMethod(s, e) {
|
|
62
|
+
const n = this.clientsToSend[e].deliveryTypes.findIndex((t) => t === s);
|
|
63
|
+
n > -1 ? this.clientsToSend[e].deliveryTypes.splice(n, 1) : this.clientsToSend[e].deliveryTypes.push(s);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var u = function() {
|
|
68
|
+
var e = this, n = e._self._c;
|
|
69
|
+
return n("div", { staticClass: "bg-white rounded-xl p-8" }, [n("div", { staticClass: "mb-6 text-lg font-semibold", domProps: { textContent: e._s(e.$t("_common:send", { thing: e.$t("_common:reminder") })) } }), e._l(e.clientsToSend, function(t, i) {
|
|
70
|
+
return n("div", { key: i, staticClass: "border border-gray-200 p-2 rounded-lg mb-3" }, [n("div", { staticClass: "mb-2 pl-1" }, [n("div", { staticClass: "font-medium text-sm" }, [e._v(e._s(t.name || t.companyName))]), t.answer ? n("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("alreadySigned").capitalize()) } }) : t.documentRole === "recipient" ? n("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("cannotSign").capitalize()) } }) : e._e()]), n("div", { staticClass: "flex" }, [n("div", { staticClass: "py-1.5 pl-1.5 rounded-md bg-gray-100 border border-gray-200 items-center flex mr-2" }, [n("CCheckbox", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { ...!e.canSendType("sms", t) && { content: e.$t("_common:missing", { thing: e.$t("_common:phoneNumber") }) } }, expression: "{ ...(!canSendType('sms', client) && { content: $t('_common:missing', { thing: $t('_common: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) {
|
|
71
|
+
return e.setDeliveryMethod("sms", i);
|
|
72
|
+
} } }, [e._v(" " + e._s(e.$t("_common:sms")) + " ")])], 1), n("div", { staticClass: "py-1.5 pl-1.5 pr-2.5 rounded-md bg-gray-100 border border-gray-200 items-center flex" }, [n("CCheckbox", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { ...!e.canSendType("email", t) && { content: e.$t("_common:missing", { thing: e.$t("_common:email") }) } }, expression: "{ ...(!canSendType('email', client) && { content: $t('_common:missing', { thing: $t('_common:email') }) }) }" }], staticClass: "font-medium", attrs: { value: e.isTypeActive("email", t), size: "tiny", disabled: !e.canSendType("email", t) }, on: { input: function(o) {
|
|
73
|
+
return e.setDeliveryMethod("email", i);
|
|
74
|
+
} } }, [e._v(" " + e._s(e.$t("_common:email").capitalize()) + " ")])], 1)])]);
|
|
75
|
+
}), n("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("_common:send", { thing: e.$t("_common:reminder") })) + " ")])], 2);
|
|
76
|
+
}, p = [], _ = /* @__PURE__ */ a(
|
|
77
|
+
l,
|
|
78
|
+
u,
|
|
79
|
+
p,
|
|
80
|
+
!1,
|
|
81
|
+
null,
|
|
82
|
+
null,
|
|
83
|
+
null,
|
|
84
|
+
null
|
|
85
|
+
);
|
|
86
|
+
const v = _.exports, y = {
|
|
87
|
+
props: {
|
|
88
|
+
document: {
|
|
89
|
+
type: Object,
|
|
90
|
+
required: !0
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
components: {
|
|
94
|
+
DocumentSendReminderModal: v
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var h = function() {
|
|
98
|
+
var e = this, n = e._self._c;
|
|
99
|
+
return n("DocumentSendReminderModal", { attrs: { document: e.document }, on: { close: function(t) {
|
|
100
|
+
return e.$router.push("/");
|
|
101
|
+
} } });
|
|
102
|
+
}, f = [], g = /* @__PURE__ */ a(
|
|
103
|
+
y,
|
|
104
|
+
h,
|
|
105
|
+
f,
|
|
106
|
+
!1,
|
|
107
|
+
null,
|
|
108
|
+
null,
|
|
109
|
+
null,
|
|
110
|
+
null
|
|
111
|
+
);
|
|
112
|
+
const T = g.exports;
|
|
113
|
+
export {
|
|
114
|
+
T as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import { n as m, J as v, g as $, i as _, K as f, d as C } from "./main.e2cbf475.js";
|
|
2
|
+
const g = {
|
|
3
|
+
new: {
|
|
4
|
+
statusClass: "draft",
|
|
5
|
+
icon: "statusDraft"
|
|
6
|
+
},
|
|
7
|
+
draft: {
|
|
8
|
+
statusClass: "draft",
|
|
9
|
+
icon: "statusDraft"
|
|
10
|
+
},
|
|
11
|
+
scheduled: {
|
|
12
|
+
statusClass: "scheduled",
|
|
13
|
+
icon: "statusScheduled"
|
|
14
|
+
},
|
|
15
|
+
sent: {
|
|
16
|
+
statusClass: "sent",
|
|
17
|
+
icon: "statusSent"
|
|
18
|
+
},
|
|
19
|
+
denied: {
|
|
20
|
+
statusClass: "denied",
|
|
21
|
+
icon: "statusDenied"
|
|
22
|
+
},
|
|
23
|
+
accepted: {
|
|
24
|
+
statusClass: "accepted",
|
|
25
|
+
icon: "statusAccepted"
|
|
26
|
+
},
|
|
27
|
+
signed: {
|
|
28
|
+
statusClass: "accepted",
|
|
29
|
+
icon: "statusAccepted"
|
|
30
|
+
},
|
|
31
|
+
semiSigned: {
|
|
32
|
+
statusClass: "accepted",
|
|
33
|
+
icon: "statusSemiSigned"
|
|
34
|
+
},
|
|
35
|
+
active: {
|
|
36
|
+
statusClass: "active",
|
|
37
|
+
icon: "statusActive"
|
|
38
|
+
},
|
|
39
|
+
completed: {
|
|
40
|
+
statusClass: "completed",
|
|
41
|
+
icon: "statusCompleted"
|
|
42
|
+
},
|
|
43
|
+
archived: {
|
|
44
|
+
statusClass: "archived",
|
|
45
|
+
icon: "statusArchive"
|
|
46
|
+
}
|
|
47
|
+
}, b = {
|
|
48
|
+
props: {
|
|
49
|
+
status: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
split: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ""
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
computed: {
|
|
59
|
+
text() {
|
|
60
|
+
return this.status ? v.t(`_common:status.${this.status}`) : "";
|
|
61
|
+
},
|
|
62
|
+
className() {
|
|
63
|
+
const { statusClass: s = "" } = g[this.status] || {};
|
|
64
|
+
return s;
|
|
65
|
+
},
|
|
66
|
+
icon() {
|
|
67
|
+
return $(g, `${this.status}.icon`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var S = function() {
|
|
72
|
+
var t = this, e = t._self._c;
|
|
73
|
+
return e("div", { staticClass: "inline-flex items-center h-6 pl-1 pr-2 text-xs font-medium leading-none rounded-full c-badge_status", class: t.className }, [t.icon ? e("BaseIcon", { staticClass: "mr-1 status-icon", attrs: { type: t.icon, size: "16" } }) : t._e(), e("span", [t._v(t._s(t.text))])], 1);
|
|
74
|
+
}, D = [], k = /* @__PURE__ */ m(
|
|
75
|
+
b,
|
|
76
|
+
S,
|
|
77
|
+
D,
|
|
78
|
+
!1,
|
|
79
|
+
null,
|
|
80
|
+
null,
|
|
81
|
+
null,
|
|
82
|
+
null
|
|
83
|
+
);
|
|
84
|
+
const w = k.exports, z = {
|
|
85
|
+
name: "DynamicLink",
|
|
86
|
+
props: {
|
|
87
|
+
template: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
computed: {
|
|
93
|
+
transformed() {
|
|
94
|
+
return { template: this.template };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var B = function() {
|
|
99
|
+
var t = this, e = t._self._c;
|
|
100
|
+
return e(t.transformed, { tag: "component" });
|
|
101
|
+
}, I = [], M = /* @__PURE__ */ m(
|
|
102
|
+
z,
|
|
103
|
+
B,
|
|
104
|
+
I,
|
|
105
|
+
!1,
|
|
106
|
+
null,
|
|
107
|
+
null,
|
|
108
|
+
null,
|
|
109
|
+
null
|
|
110
|
+
);
|
|
111
|
+
const T = M.exports, N = {
|
|
112
|
+
name: "EventItem",
|
|
113
|
+
components: {
|
|
114
|
+
DynamicLink: T
|
|
115
|
+
},
|
|
116
|
+
props: {
|
|
117
|
+
title: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: ""
|
|
120
|
+
},
|
|
121
|
+
template: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: ""
|
|
124
|
+
},
|
|
125
|
+
content: {
|
|
126
|
+
type: [String, Array],
|
|
127
|
+
default: ""
|
|
128
|
+
},
|
|
129
|
+
createdAt: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: ""
|
|
132
|
+
},
|
|
133
|
+
icon: {
|
|
134
|
+
type: String,
|
|
135
|
+
default: "square"
|
|
136
|
+
},
|
|
137
|
+
compact: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !1
|
|
140
|
+
},
|
|
141
|
+
loading: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: !1
|
|
144
|
+
},
|
|
145
|
+
color: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: "gray",
|
|
148
|
+
validator: (s) => ["blue", "teal", "orange", "green", "red", "purple", "gray", "primary"].indexOf(s) !== -1
|
|
149
|
+
},
|
|
150
|
+
isFuture: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: !1
|
|
153
|
+
},
|
|
154
|
+
size: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: ""
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
computed: {
|
|
160
|
+
date() {
|
|
161
|
+
return _(f(this.createdAt)) ? this.$formatDate(this.createdAt, "Pp") : null;
|
|
162
|
+
},
|
|
163
|
+
dayOfMonth() {
|
|
164
|
+
return _(f(this.createdAt)) ? this.$formatDate(this.createdAt, "d") : null;
|
|
165
|
+
},
|
|
166
|
+
month() {
|
|
167
|
+
return _(f(this.createdAt)) ? this.$formatDate(this.createdAt, "MMM") : null;
|
|
168
|
+
},
|
|
169
|
+
iconClasses() {
|
|
170
|
+
const s = {
|
|
171
|
+
blue: "text-blue-600 bg-blue-50",
|
|
172
|
+
teal: "text-cyan-600 bg-cyan-50",
|
|
173
|
+
orange: "text-orange-600 bg-orange-50",
|
|
174
|
+
green: "text-green-600 bg-green-50",
|
|
175
|
+
red: "text-red-600 bg-red-50",
|
|
176
|
+
purple: "text-purple-600 bg-purple-50",
|
|
177
|
+
gray: "text-gray-500 bg-gray-100",
|
|
178
|
+
primary: "text-primary-500 bg-primary-50"
|
|
179
|
+
};
|
|
180
|
+
return this.isFuture ? "bg-purple-100 text-purple-500" : s[this.color] || s.gray;
|
|
181
|
+
},
|
|
182
|
+
titleSize() {
|
|
183
|
+
return this.size === "large" ? "text-base" : "text-sm";
|
|
184
|
+
},
|
|
185
|
+
textSize() {
|
|
186
|
+
return this.size === "large" ? "text-[15px]" : "text-[13px]";
|
|
187
|
+
},
|
|
188
|
+
dateSize() {
|
|
189
|
+
return this.size === "large" ? "text-sm" : "text-xs";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
var O = function() {
|
|
194
|
+
var t = this, e = t._self._c;
|
|
195
|
+
return e("div", { staticClass: "flex flex-nowrap relative text-primary-500 cursor-default pb-5 ml-4 event before:content-[''] before:absolute before:w-px before:h-full before:bg-gray-300 before:-left-px before:top-4 last:before:hidden" }, [e("div", { staticClass: "m-0 h-[23px] relative", staticStyle: { "--bg": "#fff" } }, [e("div", { staticClass: "rounded-full absolute left-1/2 top-1/2 z-[1] w-7 h-7 flex items-center justify-center border-none bg-gray-100", class: t.iconClasses, staticStyle: { transform: "translate(-50%, calc(-50% + 8px))", "box-shadow": "0 0 0 2px var(--bg)" } }, [t.loading ? t._e() : e("BaseIcon", { attrs: { type: t.icon, size: "14" } })], 1)]), e("div", { staticClass: "ml-7 min-w-0 flex-grow flex flex-col pt-1" }, [t.loading ? [e("CSkeleton", { staticClass: "max-w-md text-gray-900 font-medium", class: t.titleSize, attrs: { width: "80%" } }), e("CSkeleton", { staticClass: "text-gray-600", class: t.textSize, attrs: { width: "40%" } }), e("CSkeleton", { staticClass: "text-center text-gray-500 text-xs inline-flex pt-0.5", class: t.dateSize, attrs: { hidden: "" } })] : t._e(), e("div", { staticClass: "max-w-md font-medium", class: [t.isFuture ? "text-gray-500" : "text-gray-700", t.titleSize] }, [t.template ? e("DynamicLink", { attrs: { template: t.template } }) : [t._v(t._s(t.title))]], 2), t.content ? e("div", { class: [t.isFuture ? "text-gray-400" : "text-gray-600", t.textSize] }, [e("div", { domProps: { innerHTML: t._s(t.content) } })]) : t._e(), e("div", { staticClass: "text-center text-gray-500 inline-flex pt-1", class: t.dateSize }, [e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.date, expression: "date" }] }, [t._v(t._s(t.dayOfMonth) + " " + t._s(t.month))])])], 2)]);
|
|
196
|
+
}, E = [], A = /* @__PURE__ */ m(
|
|
197
|
+
N,
|
|
198
|
+
O,
|
|
199
|
+
E,
|
|
200
|
+
!1,
|
|
201
|
+
null,
|
|
202
|
+
null,
|
|
203
|
+
null,
|
|
204
|
+
null
|
|
205
|
+
);
|
|
206
|
+
const F = A.exports, q = {
|
|
207
|
+
sv: {
|
|
208
|
+
clientName: "Kunden",
|
|
209
|
+
byName: "Av {{- name}}",
|
|
210
|
+
withBankId: "med BankID",
|
|
211
|
+
propertyDesignation: "Beg\xE4ran om fastighetsbeteckning",
|
|
212
|
+
viewed: "Granskat",
|
|
213
|
+
viewedContent: "{{- name}} har visat dokumentet",
|
|
214
|
+
statusChangedAccepted: "Dokumentet har blivit signerat",
|
|
215
|
+
statusChangedDenied: "Dokumentet har blivit nekat",
|
|
216
|
+
requestChange: "Markerades manuellt som",
|
|
217
|
+
mailOpened: "Mail visat",
|
|
218
|
+
mailOpenedContent: "{{email}} visat",
|
|
219
|
+
mailDropped: "E-post kunde inte skickas",
|
|
220
|
+
smsDropped: "SMS kunde inte skickas",
|
|
221
|
+
expired: "Upph\xF6rde att g\xE4lla",
|
|
222
|
+
expiredContent: "Markerades som nekat f\xF6r att giltighetstiden har passerat"
|
|
223
|
+
},
|
|
224
|
+
en: {
|
|
225
|
+
clientName: "Client",
|
|
226
|
+
byName: "By {{- name}}",
|
|
227
|
+
withBankId: "with BankID",
|
|
228
|
+
propertyDesignation: "Request for property designation",
|
|
229
|
+
viewed: "Viewed",
|
|
230
|
+
viewedContent: "{{- name}} has viewed the document",
|
|
231
|
+
statusChangedAccepted: "The document has been signed",
|
|
232
|
+
statusChangedDenied: "The document has been denied",
|
|
233
|
+
requestChange: "Manually marked as",
|
|
234
|
+
mailOpened: "Email opened",
|
|
235
|
+
mailOpenedContent: "{{email}} viewed",
|
|
236
|
+
mailDropped: "Could not send email",
|
|
237
|
+
smsDropped: "Could not send SMS",
|
|
238
|
+
expired: "Expired",
|
|
239
|
+
expiredContent: "Marked as declined - expiration date has passed"
|
|
240
|
+
}
|
|
241
|
+
}, R = {
|
|
242
|
+
name: "DocumentTimeline",
|
|
243
|
+
i18nOptions: {
|
|
244
|
+
namespaces: "documentTimeline",
|
|
245
|
+
messages: q
|
|
246
|
+
},
|
|
247
|
+
components: {
|
|
248
|
+
StatusBadge: w,
|
|
249
|
+
EventItem: F
|
|
250
|
+
},
|
|
251
|
+
props: {
|
|
252
|
+
id: {
|
|
253
|
+
type: String,
|
|
254
|
+
required: !0
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
computed: {
|
|
258
|
+
...C({
|
|
259
|
+
docById: "documents2/byId",
|
|
260
|
+
userById: "companyUsers/byId"
|
|
261
|
+
}),
|
|
262
|
+
document() {
|
|
263
|
+
return this.docById(this.id);
|
|
264
|
+
},
|
|
265
|
+
events() {
|
|
266
|
+
var n;
|
|
267
|
+
const s = [
|
|
268
|
+
this.formatEvent({
|
|
269
|
+
code: "created",
|
|
270
|
+
createdAt: (n = this.document) == null ? void 0 : n.createdAt
|
|
271
|
+
})
|
|
272
|
+
], { events: t, scheduledFirstDelivery: e } = this.document || {};
|
|
273
|
+
if ((e == null ? void 0 : e.status) === "active") {
|
|
274
|
+
const r = e.deliveryTypes.join(
|
|
275
|
+
` ${this.$t("_common:and")} `
|
|
276
|
+
);
|
|
277
|
+
s.push({
|
|
278
|
+
title: this.$t("_common:scheduledDelivery"),
|
|
279
|
+
content: `${this.$t(
|
|
280
|
+
"_common:via"
|
|
281
|
+
)} ${r}, ${this.$formatDate(
|
|
282
|
+
e.sendAt
|
|
283
|
+
)}`,
|
|
284
|
+
isFuture: !0,
|
|
285
|
+
icon: "calendar",
|
|
286
|
+
color: "primary"
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return t == null || t.forEach((r) => s.push(this.formatEvent(r))), s;
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
methods: {
|
|
293
|
+
formatEvent({ code: s, data: t, createdAt: e, children: n = [] }) {
|
|
294
|
+
const {
|
|
295
|
+
client: r = {},
|
|
296
|
+
clients: p,
|
|
297
|
+
email: c,
|
|
298
|
+
status: d,
|
|
299
|
+
counter: x,
|
|
300
|
+
sendSource: h,
|
|
301
|
+
companyUserId: y
|
|
302
|
+
} = t || {}, u = x || n.length + 1, o = r.name;
|
|
303
|
+
return {
|
|
304
|
+
created: () => ({
|
|
305
|
+
title: this.$t("_common:created"),
|
|
306
|
+
createdAt: e,
|
|
307
|
+
icon: "folder",
|
|
308
|
+
color: "primary"
|
|
309
|
+
}),
|
|
310
|
+
viewed: () => ({
|
|
311
|
+
title: this.$t("viewed"),
|
|
312
|
+
content: (o ? this.$t("viewedContent", { name: o }) : "") + (u ? ` ${this.$tc("_common:times", { count: u })}` : ""),
|
|
313
|
+
createdAt: e,
|
|
314
|
+
icon: "eye",
|
|
315
|
+
color: "primary"
|
|
316
|
+
}),
|
|
317
|
+
accepted: () => {
|
|
318
|
+
var a;
|
|
319
|
+
const i = {
|
|
320
|
+
title: this.$t("_common:status.signed"),
|
|
321
|
+
content: o ? this.$t("byName", { name: o }) : "",
|
|
322
|
+
createdAt: e,
|
|
323
|
+
icon: "check",
|
|
324
|
+
color: "primary"
|
|
325
|
+
};
|
|
326
|
+
return i.content && ((a = r.answerMethod) == null ? void 0 : a.accept) === "bankId" && (i.content += ` ${this.$t("withBankId")}`), i;
|
|
327
|
+
},
|
|
328
|
+
denied: () => ({
|
|
329
|
+
title: this.$t("_common:status.denied"),
|
|
330
|
+
content: o ? this.$t("byName", { name: o }) : "",
|
|
331
|
+
createdAt: e,
|
|
332
|
+
icon: "x",
|
|
333
|
+
color: "primary"
|
|
334
|
+
}),
|
|
335
|
+
sent: () => {
|
|
336
|
+
let i = this.$t("_common:sent");
|
|
337
|
+
return ["reminder", "propertyDesignation"].includes(h) && (i = this.$t("_common:sentThing", {
|
|
338
|
+
thing: h === "reminder" ? this.$t("_common:reminder") : this.$t("propertyDesignation")
|
|
339
|
+
})), {
|
|
340
|
+
title: i,
|
|
341
|
+
content: p == null ? void 0 : p.map(
|
|
342
|
+
(a) => ["email", "cellphone"].filter((l) => !!a[l]).map((l) => a[l]).join(` ${this.$t("_common:and")} `)
|
|
343
|
+
).reduce(
|
|
344
|
+
(a, l) => a ? `${a}<div>${l}</div>` : `${this.$t("_common:to")}: ${l}`.capitalize(),
|
|
345
|
+
""
|
|
346
|
+
),
|
|
347
|
+
createdAt: e,
|
|
348
|
+
icon: h === "reminder" ? "bell" : "send",
|
|
349
|
+
color: "primary"
|
|
350
|
+
};
|
|
351
|
+
},
|
|
352
|
+
statusChanged: () => ["accepted", "denied"].includes(d) ? {
|
|
353
|
+
title: d === "accepted" ? this.$t("statusChangedAccepted") : this.$t("statusChangedDenied"),
|
|
354
|
+
createdAt: e,
|
|
355
|
+
icon: d === "accepted" ? "check" : "x",
|
|
356
|
+
color: d === "accepted" ? "green" : "red"
|
|
357
|
+
} : null,
|
|
358
|
+
requestChange: () => {
|
|
359
|
+
var a;
|
|
360
|
+
const i = ((a = this.userById(y)) == null ? void 0 : a.fullName) || "";
|
|
361
|
+
return {
|
|
362
|
+
title: `${this.$t("requestChange")} ${this.$t(
|
|
363
|
+
`_common:status.${d}`
|
|
364
|
+
)}`,
|
|
365
|
+
content: i && this.$t("byName", { name: i }),
|
|
366
|
+
createdAt: e,
|
|
367
|
+
icon: "tool",
|
|
368
|
+
color: "primary"
|
|
369
|
+
};
|
|
370
|
+
},
|
|
371
|
+
mailDelivered: () => ({
|
|
372
|
+
title: this.$t("_common:sentThing", {
|
|
373
|
+
thing: this.$t("_common:email").capitalize()
|
|
374
|
+
}),
|
|
375
|
+
content: c ? `${this.$t("_common:to")}: ${c}`.capitalize() : "",
|
|
376
|
+
createdAt: e,
|
|
377
|
+
icon: "inbox",
|
|
378
|
+
color: "primary"
|
|
379
|
+
}),
|
|
380
|
+
mailOpened: () => ({
|
|
381
|
+
title: this.$t("mailOpened"),
|
|
382
|
+
content: `${this.$t("mailOpenedContent", { email: c })} ${u ? this.$tc("_common:times", { count: u }) : ""}`,
|
|
383
|
+
createdAt: e,
|
|
384
|
+
icon: "email",
|
|
385
|
+
color: "primary"
|
|
386
|
+
}),
|
|
387
|
+
mailDropped: () => ({
|
|
388
|
+
title: this.$t("mailDropped"),
|
|
389
|
+
content: c ? this.$t("toEmail", { email: c }) : null,
|
|
390
|
+
createdAt: e,
|
|
391
|
+
icon: "alert-triangle",
|
|
392
|
+
color: "orange"
|
|
393
|
+
}),
|
|
394
|
+
smsDropped: () => ({
|
|
395
|
+
title: this.$t("smsDropped"),
|
|
396
|
+
content: t ? `${this.$t("_common:to")}: ${t}`.capitalize() : "",
|
|
397
|
+
createdAt: e,
|
|
398
|
+
icon: "alert-triangle",
|
|
399
|
+
color: "orange"
|
|
400
|
+
}),
|
|
401
|
+
expired: () => ({
|
|
402
|
+
title: this.$t("expired"),
|
|
403
|
+
content: this.$t("expiredContent"),
|
|
404
|
+
createdAt: e,
|
|
405
|
+
icon: "x",
|
|
406
|
+
color: "red"
|
|
407
|
+
})
|
|
408
|
+
}[s]();
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
var L = function() {
|
|
413
|
+
var t = this, e = t._self._c;
|
|
414
|
+
return e("div", [e("div", { staticClass: "border-b mb-4 pb-4" }, [e("div", { staticClass: "mb-2" }, [e("div", { staticClass: "text-xs text-gray-600", domProps: { textContent: t._s(t.$t("_common:document").capitalize()) } }), e("div", { staticClass: "font-semibold text-lg" }, [t._v(t._s(t.document.name))])]), e("div", { staticClass: "inline-flex items-center -ml-2" }, [e("div", { staticClass: "text-xs text-gray-600 mr-1.5 py-1 pl-2", domProps: { textContent: t._s(t.$t("_common:status.status")) } }), e("StatusBadge", { attrs: { status: t.document.status } })], 1)]), t._l(t.events, function(n, r) {
|
|
415
|
+
return e("EventItem", { key: r, attrs: { title: n.title, content: n.content, createdAt: n.createdAt, icon: n.icon, color: n.color, "is-future": n.isFuture, size: "large" } });
|
|
416
|
+
})], 2);
|
|
417
|
+
}, P = [], j = /* @__PURE__ */ m(
|
|
418
|
+
R,
|
|
419
|
+
L,
|
|
420
|
+
P,
|
|
421
|
+
!1,
|
|
422
|
+
null,
|
|
423
|
+
null,
|
|
424
|
+
null,
|
|
425
|
+
null
|
|
426
|
+
);
|
|
427
|
+
const U = j.exports, G = {
|
|
428
|
+
name: "DocTimeline",
|
|
429
|
+
components: {
|
|
430
|
+
DocumentTimeline: U
|
|
431
|
+
},
|
|
432
|
+
props: {
|
|
433
|
+
id: {
|
|
434
|
+
type: String,
|
|
435
|
+
required: !0
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
var K = function() {
|
|
440
|
+
var t = this, e = t._self._c;
|
|
441
|
+
return e("div", { staticClass: "p-8" }, [e("DocumentTimeline", { attrs: { id: t.id } })], 1);
|
|
442
|
+
}, V = [], H = /* @__PURE__ */ m(
|
|
443
|
+
G,
|
|
444
|
+
K,
|
|
445
|
+
V,
|
|
446
|
+
!1,
|
|
447
|
+
null,
|
|
448
|
+
null,
|
|
449
|
+
null,
|
|
450
|
+
null
|
|
451
|
+
);
|
|
452
|
+
const W = H.exports;
|
|
453
|
+
export {
|
|
454
|
+
W as default
|
|
455
|
+
};
|