@aaravpos/appointment-booking-plugin 5.0.4 → 5.0.6
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/index.cjs +5 -5
- package/dist/index.js +17 -14
- package/dist/styles.css +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2359,9 +2359,12 @@ var nr = (e) => e ? [
|
|
|
2359
2359
|
},
|
|
2360
2360
|
clearSelectedProfessional: (e) => {
|
|
2361
2361
|
e.selectedProfessional = null;
|
|
2362
|
+
},
|
|
2363
|
+
deleteService: (e, t) => {
|
|
2364
|
+
e.selectedServices = e.selectedServices.filter((r) => r.id !== t.payload);
|
|
2362
2365
|
}
|
|
2363
2366
|
}
|
|
2364
|
-
}), { setServicePayload: ef, setCategory: Kv, toggleService: Ar, clearSelectedServices: xi, clearSelectedProfessional: ki, incrementService: ad, decrementService: xr, toggleProfessional: id } = nd.actions, tf = nd.reducer, Ge = "https://prod.aaravpos.com/api/v1", Ke = () => ({
|
|
2367
|
+
}), { setServicePayload: ef, setCategory: Kv, toggleService: Ar, clearSelectedServices: xi, clearSelectedProfessional: ki, incrementService: ad, decrementService: xr, toggleProfessional: id, deleteService: Yv } = nd.actions, tf = nd.reducer, Ge = "https://prod.aaravpos.com/api/v1", Ke = () => ({
|
|
2365
2368
|
"Content-Type": "application/json",
|
|
2366
2369
|
Authorization: `Bearer ${an.getState()?.booking.outletDetails?.token}`
|
|
2367
2370
|
}), Mi = async (e, t, r) => {
|
|
@@ -2587,7 +2590,7 @@ var nr = (e) => e ? [
|
|
|
2587
2590
|
t.loading = !1, t.error = r.payload || "Appointment failed";
|
|
2588
2591
|
});
|
|
2589
2592
|
}
|
|
2590
|
-
}), { resetAppointment: ft, setBookingMode:
|
|
2593
|
+
}), { resetAppointment: ft, setBookingMode: Zv, setUserDetails: En, setTips: pf, setAppointmentId: ar, clearUserDetails: mf, setPayType: hf } = dd.actions, vf = dd.reducer, ld = He({
|
|
2591
2594
|
name: "outletList",
|
|
2592
2595
|
initialState: { outlets: [] },
|
|
2593
2596
|
reducers: {
|
|
@@ -2598,7 +2601,7 @@ var nr = (e) => e ? [
|
|
|
2598
2601
|
e.outlets = [];
|
|
2599
2602
|
}
|
|
2600
2603
|
}
|
|
2601
|
-
}), { setOutletList: yf, clearOutletList:
|
|
2604
|
+
}), { setOutletList: yf, clearOutletList: Xv } = ld.actions, $f = ld.reducer, gf = (0, Yn.combineReducers)({ booking: (0, Yn.combineReducers)({
|
|
2602
2605
|
breadcrumbs: Yu,
|
|
2603
2606
|
outletDetails: Qu,
|
|
2604
2607
|
service: tf,
|
|
@@ -2630,7 +2633,7 @@ var nr = (e) => e ? [
|
|
|
2630
2633
|
Hl,
|
|
2631
2634
|
Kl
|
|
2632
2635
|
] } })
|
|
2633
|
-
}), Ma = Xl(an),
|
|
2636
|
+
}), Ma = Xl(an), Jv = an.getState;
|
|
2634
2637
|
function Sf({ children: e }) {
|
|
2635
2638
|
return /* @__PURE__ */ d(Ul, {
|
|
2636
2639
|
store: an,
|
|
@@ -4291,8 +4294,8 @@ function Nd({ buttonText: e, onButtonClick: t, showTaxesOnlyIfTime: r = !1, show
|
|
|
4291
4294
|
b
|
|
4292
4295
|
]), he = oe.reduce((k, M) => k + Number(M.price || M.min_price) * (M.qty || 1), 0), Ne = oe.reduce((k, M) => k + Number(M.duration) * (M.qty || 1), 0), te = Math.ceil(Ne / ue), fe = (k) => {
|
|
4293
4296
|
if (!ie.length) return "";
|
|
4294
|
-
const M = ie[k]?.
|
|
4295
|
-
return !M || !V ? "" : `${M} - ${V.
|
|
4297
|
+
const M = ie[k]?.start_time_12h, V = ie[k + te - 1];
|
|
4298
|
+
return !M || !V ? "" : `${M} - ${V.end_time_12h || V.start_time_12h}`;
|
|
4296
4299
|
}, Fe = p || {
|
|
4297
4300
|
day: S.day,
|
|
4298
4301
|
month: S.month,
|
|
@@ -5079,7 +5082,7 @@ function An({ icon: e, label: t, slots: r, allSlots: n, selectedSlotIndexes: a,
|
|
|
5079
5082
|
className: `arravpos-slot-card ${f ? "arravpos-slot-card-disabled" : u ? "arravpos-slot-card-selected" : "arravpos-slot-card-default"}`,
|
|
5080
5083
|
children: [/* @__PURE__ */ d("span", {
|
|
5081
5084
|
className: "arravpos-slot-time",
|
|
5082
|
-
children: l.
|
|
5085
|
+
children: l.start_time_12h
|
|
5083
5086
|
}), /* @__PURE__ */ d("span", {
|
|
5084
5087
|
className: "arravpos-slot-status",
|
|
5085
5088
|
children: f ? "Booked" : "Available"
|
|
@@ -17101,7 +17104,7 @@ function tl(e) {
|
|
|
17101
17104
|
aspectRatio: O.default.number
|
|
17102
17105
|
}, i;
|
|
17103
17106
|
}
|
|
17104
|
-
var
|
|
17107
|
+
var Qv = tl({
|
|
17105
17108
|
flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
|
|
17106
17109
|
flagComponent: za,
|
|
17107
17110
|
internationalIcon: cn
|
|
@@ -18161,7 +18164,7 @@ function fl(e) {
|
|
|
18161
18164
|
labels: nl
|
|
18162
18165
|
}, t;
|
|
18163
18166
|
}
|
|
18164
|
-
var
|
|
18167
|
+
var ey = fl();
|
|
18165
18168
|
function rv(e, t) {
|
|
18166
18169
|
var r = Array.prototype.slice.call(t);
|
|
18167
18170
|
return r.push(Cd), e.apply(this, r);
|
|
@@ -19068,8 +19071,8 @@ function Ov() {
|
|
|
19068
19071
|
...p?.evening ?? []
|
|
19069
19072
|
], ml = pn.reduce((_, T) => _ + Number(T.duration ?? 0), 0), hl = Math.ceil(ml / Pv), vl = (_) => {
|
|
19070
19073
|
if (!mn.length) return "";
|
|
19071
|
-
const T = mn[_]?.
|
|
19072
|
-
return !T || !j ? "" : `${T} - ${j.
|
|
19074
|
+
const T = mn[_]?.start_time_12h, j = mn[_ + hl - 1];
|
|
19075
|
+
return !T || !j ? "" : `${T} - ${j.end_time_12h ?? j.start_time_12h}`;
|
|
19073
19076
|
}, qa = {
|
|
19074
19077
|
day: Number(f?.day ?? N.day),
|
|
19075
19078
|
month: Number(f?.month ?? N.month),
|
|
@@ -19935,7 +19938,7 @@ function Av() {
|
|
|
19935
19938
|
n.appointmentDate,
|
|
19936
19939
|
" at",
|
|
19937
19940
|
" ",
|
|
19938
|
-
n.
|
|
19941
|
+
n.start_time_12h
|
|
19939
19942
|
]
|
|
19940
19943
|
})]
|
|
19941
19944
|
}),
|
|
@@ -20074,7 +20077,7 @@ var Dv = ({ bookingCode: e }) => {
|
|
|
20074
20077
|
}
|
|
20075
20078
|
}) : /* @__PURE__ */ d(kv, {})
|
|
20076
20079
|
});
|
|
20077
|
-
},
|
|
20080
|
+
}, ty = ({ ...e }) => /* @__PURE__ */ d(Sf, { children: /* @__PURE__ */ d(Dv, { ...e }) });
|
|
20078
20081
|
export {
|
|
20079
|
-
|
|
20082
|
+
ty as AppointmentBookingPlugin
|
|
20080
20083
|
};
|