@feedmepos/mf-payment 1.2.29 → 1.2.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,148 +0,0 @@
1
- import { defineComponent as P, ref as z, onMounted as H, computed as U, resolveComponent as a, openBlock as n, createBlock as f, unref as o, withCtx as x, createElementVNode as s, createElementBlock as m, Fragment as k, renderList as R, createVNode as p, toDisplayString as i, createTextVNode as l, createCommentVNode as b } from "vue";
2
- import { _ as $ } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
3
- import { u as D, p as W, e as B } from "./index-BasdAonL.js";
4
- import { useI18n as q, useCoreStore as G } from "@feedmepos/mf-common";
5
- import { o as J } from "./index-MqVn-IaA.js";
6
- import { useRouter as K } from "vue-router";
7
- const Q = { class: "grid grid-cols-3 gap-6" }, X = { class: "flex items-center" }, Z = ["src"], w = { class: "px-16 text-sm flex-grow" }, ss = { class: "list-disc pl-6" }, es = {
8
- key: 0,
9
- class: "px-24 py-8"
10
- }, ts = { class: "font-medium text-sm" }, os = { class: "text-xs text-gray-500 mb-8 break-all whitespace-pre-line" }, ns = {
11
- key: 0,
12
- class: "flex flex-col items-end"
13
- }, is = { class: "text-xs text-gray-500 text-right mb-4" }, rs = { class: "flex items-center mt-2" }, as = { class: "text-green-600 font-medium mr-2" }, ms = {
14
- key: 1,
15
- class: "flex flex-col items-end"
16
- }, ls = { class: "text-xs text-gray-500 text-right mb-4" }, cs = { class: "flex items-center mt-2" }, us = { class: "text-orange-600 font-medium mr-2" }, hs = /* @__PURE__ */ P({
17
- __name: "OnboardSubmission",
18
- setup(ds) {
19
- const N = K(), { isLoading: S, startAsyncCall: A } = D(!1), { t: e } = q(), { currentRestaurant: O, currentCountry: _ } = G(), y = z([]);
20
- H(() => {
21
- A(async () => {
22
- y.value = await J.getByRestaurant(O.value._id);
23
- });
24
- });
25
- const T = [
26
- {
27
- type: W.FdoOnboardType.enum.softspace,
28
- name: "FassPay",
29
- description: () => e("payment.onboard-submission.softspace.description"),
30
- logo: "/src/assets/images/gateway/softspace.jpeg",
31
- country: [B.F_COUNTRY.enum.MY],
32
- services: [
33
- () => e("payment.onboard-submission.softspace.service1"),
34
- () => e("payment.onboard-submission.softspace.service2")
35
- ]
36
- }
37
- ], V = U(
38
- () => T.filter((c) => c.country.includes((_ == null ? void 0 : _.value) || B.F_COUNTRY.enum.MY)).map((c) => ({
39
- ...c,
40
- submission: y.value.find((r) => r.type === c.type)
41
- }))
42
- );
43
- return (c, r) => {
44
- const Y = a("FmCardHeader"), j = a("FmIcon"), E = a("FmCircularProgress"), I = a("FmButton"), L = a("FmCardActions"), M = a("FmCard");
45
- return n(), f($, {
46
- title: o(e)("payment.onboard-submission.title"),
47
- description: o(e)("payment.onboard-submission.description"),
48
- loading: o(S)
49
- }, {
50
- default: x(() => [
51
- s("div", Q, [
52
- (n(!0), m(k, null, R(V.value, (t, ps) => (n(), f(M, { class: "h-full flex flex-col pt-8" }, {
53
- default: x(() => {
54
- var v, h;
55
- return [
56
- s("div", X, [
57
- s("img", {
58
- class: "w-64 h-64 ml-6",
59
- src: t.logo
60
- }, null, 8, Z),
61
- p(Y, {
62
- title: t.name,
63
- subtitle: t.description()
64
- }, null, 8, ["title", "subtitle"])
65
- ]),
66
- s("div", w, [
67
- s("ul", ss, [
68
- (n(!0), m(k, null, R(t.services, (u, d) => (n(), m("li", {
69
- key: `service-${d}`
70
- }, i(u()), 1))), 128))
71
- ])
72
- ]),
73
- (v = t.submission) != null && v.statusReason ? (n(), m("div", es, [
74
- s("p", ts, [
75
- l(i(o(e)("payment.onboard-submission.note")) + ": ", 1),
76
- s("span", os, i((h = t.submission) == null ? void 0 : h.statusReason), 1)
77
- ])
78
- ])) : b("", !0),
79
- p(L, { class: "justify-end mt-auto" }, {
80
- default: x(() => {
81
- var u, d, C, F;
82
- return [
83
- ((u = t.submission) == null ? void 0 : u.status) === "approved" ? (n(), m("div", ns, [
84
- s("p", is, [
85
- l(i(o(e)("payment.onboard-submission.approval.line1")), 1),
86
- r[0] || (r[0] = s("br", null, null, -1)),
87
- l(" " + i(o(e)("payment.onboard-submission.approval.line2")), 1)
88
- ]),
89
- s("div", rs, [
90
- s("p", as, [
91
- l(i(o(e)("payment.onboard-submission.approval.status")), 1),
92
- r[1] || (r[1] = s("br", null, null, -1))
93
- ]),
94
- p(j, {
95
- size: "md",
96
- name: "check",
97
- color: "#16a34a"
98
- })
99
- ])
100
- ])) : b("", !0),
101
- ((d = t.submission) == null ? void 0 : d.status) === "submitted" ? (n(), m("div", ms, [
102
- s("p", ls, [
103
- l(i(o(e)("payment.onboard-submission.review.line1")), 1),
104
- r[2] || (r[2] = s("br", null, null, -1)),
105
- l(" " + i(o(e)("payment.onboard-submission.review.line2")), 1)
106
- ]),
107
- s("div", cs, [
108
- s("p", us, i(o(e)("payment.onboard-submission.review.status")), 1),
109
- p(E, {
110
- size: "md",
111
- color: "#ea580c"
112
- })
113
- ])
114
- ])) : b("", !0),
115
- ((C = t.submission) == null ? void 0 : C.status) === "pending" || ((F = t.submission) == null ? void 0 : F.status) === "rejected" ? (n(), f(I, {
116
- key: 2,
117
- variant: "primary",
118
- "prepend-icon": t.submission ? "edit" : "manage_accounts",
119
- label: t.submission ? o(e)("payment.onboard-submission.edit") : o(e)("payment.onboard-submission.apply"),
120
- onClick: () => {
121
- var g;
122
- return o(N).push({
123
- name: "mf-payment-onboard-submission-form",
124
- params: {
125
- type: t.type,
126
- submission: (g = t.submission) == null ? void 0 : g._id
127
- }
128
- });
129
- }
130
- }, null, 8, ["prepend-icon", "label", "onClick"])) : b("", !0)
131
- ];
132
- }),
133
- _: 2
134
- }, 1024)
135
- ];
136
- }),
137
- _: 2
138
- }, 1024))), 256))
139
- ])
140
- ]),
141
- _: 1
142
- }, 8, ["title", "description", "loading"]);
143
- };
144
- }
145
- });
146
- export {
147
- hs as default
148
- };
@@ -1,68 +0,0 @@
1
- import { d as o, b as t, g as n, o as i } from "./index-BasdAonL.js";
2
- import { f as u } from "./plugins-BLG_oAxW.js";
3
- import { h as d } from "./moment-h96o7c8I.js";
4
- const c = {
5
- async read(s) {
6
- return o(
7
- await t().get("/payments/onboard-submissions", {
8
- params: { ...s }
9
- })
10
- );
11
- },
12
- async readById(s) {
13
- return n(
14
- await t().get(`/payments/onboard-submissions/${s}`)
15
- );
16
- },
17
- async reviewById(s, a) {
18
- return n(
19
- await t().put(`/payments/onboard-submissions/${s}`, a)
20
- );
21
- },
22
- async getById(s, a) {
23
- return n(
24
- await t().get(
25
- `restaurants/${a}/onboard-submissions/${s}`
26
- )
27
- );
28
- },
29
- async getByRestaurant(s) {
30
- return n(
31
- await t().get(
32
- `restaurants/${s}/onboard-submissions`
33
- )
34
- );
35
- },
36
- async uploadDocument(s, a, e) {
37
- const r = d().toISOString();
38
- return u.update(
39
- `restaurant/${s}/documents/${a}/${r}.pdf`,
40
- e
41
- );
42
- },
43
- async updateSubmission(s) {
44
- return n(
45
- await t().put(
46
- `restaurants/${s.restaurantId}/onboard-submissions`,
47
- s
48
- )
49
- );
50
- },
51
- async previewDocument(s, a) {
52
- const e = await t().get(
53
- `restaurants/${s}/onboard-submissions/${a}/document`,
54
- { responseType: "blob" }
55
- );
56
- i(e.data);
57
- },
58
- async sendDocument(s, a) {
59
- return n(
60
- await t().post(
61
- `restaurants/${s}/onboard-submissions/${a}/send`
62
- )
63
- );
64
- }
65
- };
66
- export {
67
- c as o
68
- };