@bagdja/kumpul 1.0.3 → 1.2.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/README.md +28 -1
- package/dist/client.js +14 -0
- package/dist/server.cjs +794 -59
- package/manifest.json +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,11 +15,38 @@ direction and notes about the prototype's sample data and host-managed pages.
|
|
|
15
15
|
## Contract
|
|
16
16
|
|
|
17
17
|
- Package: `@bagdja/kumpul`
|
|
18
|
-
- Version: `1.0
|
|
18
|
+
- Version: `1.1.0`
|
|
19
19
|
- Template slug: `kumpul`
|
|
20
20
|
- `manifestVersion`: `1`, `rendererApiVersion`: `1`
|
|
21
21
|
- Entry point: `dist/server.cjs` (wajib) dan `dist/client.js` (JavaScript browser), dinyatakan di `manifest.entry`
|
|
22
22
|
- Halaman contoh untuk website baru: `manifest.defaultPages` (Beranda, Katalog Gathering, Cara Kerja, Tentang)
|
|
23
|
+
- Halaman sistem milik template (`manifest.pageOverrides`): header, keranjang, transaksi, detail transaksi, tagihan, invoice, kalender, rencana gathering
|
|
24
|
+
|
|
25
|
+
## Halaman sistem (`props.page`)
|
|
26
|
+
|
|
27
|
+
Sejak `1.1.0`, data halaman sistem dibaca dari `props.page` sesuai kontrak
|
|
28
|
+
Bagdja (`bagdja-website-template-runtime/contract/page-contract.d.ts`), bukan
|
|
29
|
+
lagi dari `props.preview*`. `src/page-adapter.cjs` adalah satu-satunya tempat
|
|
30
|
+
yang mengenal bentuk kontrak itu dan menerjemahkannya ke model internal
|
|
31
|
+
renderer. Data yang sama dipakai di preview lokal, preview platform, dan
|
|
32
|
+
website seller; `isPreview` hanya mengatur catatan "Preview desainer" dan
|
|
33
|
+
simulator rencana gathering.
|
|
34
|
+
|
|
35
|
+
- Tanggal: ISO 8601 dengan offset timezone; uang: bilangan bulat rupiah.
|
|
36
|
+
- Template tidak menerima email/token/ID internal. Identitas aksi = `key` opaque.
|
|
37
|
+
- Aksi memakai atribut bridge host Bagdja — bootstrap di iframe menangani
|
|
38
|
+
klik, template tidak memanggil API:
|
|
39
|
+
`data-bagdja-intent` (`cart.set_quantity` / `cart.remove` / `cart.checkout` /
|
|
40
|
+
`invoice.pay` / `gathering.respond`) + `data-bagdja-key`,
|
|
41
|
+
`data-bagdja-quantity` (jumlah tujuan), `data-bagdja-selectable` pada checkbox
|
|
42
|
+
item yang ikut checkout, dan `data-bagdja-action="order.retry_payment"` untuk
|
|
43
|
+
aksi transaksi. Tombol baru aktif bila host menyediakan bridge
|
|
44
|
+
(`props.bridgeVersion`); setelah aksi berhasil host memuat ulang halaman atau
|
|
45
|
+
mengarahkan ke pembayaran.
|
|
46
|
+
- `props.headerOnly === true` → hanya header Kumpul (halaman yang isinya masih
|
|
47
|
+
dikelola Bagdja, mis. chat dan checkout).
|
|
48
|
+
- Fixture halaman sistem di `fixtures/` memakai data yang sama dengan fixture
|
|
49
|
+
standar Bagdja, dengan identitas Kumpul.
|
|
23
50
|
- Export: `render(props)`, returning a React element
|
|
24
51
|
- React: supplied by the Bagdja runtime
|
|
25
52
|
|
package/dist/client.js
CHANGED
|
@@ -2120,6 +2120,20 @@
|
|
|
2120
2120
|
window.addEventListener("resize", updateHeaderHeight);
|
|
2121
2121
|
}
|
|
2122
2122
|
}
|
|
2123
|
+
document.querySelectorAll("[data-plan-live]").forEach((workflow) => {
|
|
2124
|
+
const tabs = Array.from(workflow.querySelectorAll("[data-plan-step-tab]"));
|
|
2125
|
+
const panels = Array.from(workflow.querySelectorAll("[data-plan-step-panel]"));
|
|
2126
|
+
tabs.forEach((tab) => {
|
|
2127
|
+
tab.addEventListener("click", () => {
|
|
2128
|
+
if (tab.disabled) return;
|
|
2129
|
+
const step = tab.dataset.planStepTab;
|
|
2130
|
+
tabs.forEach((item) => item.setAttribute("aria-pressed", String(item === tab)));
|
|
2131
|
+
panels.forEach((panel) => {
|
|
2132
|
+
panel.hidden = panel.dataset.planStepPanel !== step;
|
|
2133
|
+
});
|
|
2134
|
+
});
|
|
2135
|
+
});
|
|
2136
|
+
});
|
|
2123
2137
|
document.querySelectorAll("[data-calendar-page]").forEach((calendar) => {
|
|
2124
2138
|
const tabs = Array.from(calendar.querySelectorAll("[data-calendar-tab]"));
|
|
2125
2139
|
const panels = Array.from(calendar.querySelectorAll("[data-calendar-panel]"));
|
package/dist/server.cjs
CHANGED
|
@@ -1,5 +1,321 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/page-adapter.cjs
|
|
7
|
+
var require_page_adapter = __commonJS({
|
|
8
|
+
"src/page-adapter.cjs"(exports2, module2) {
|
|
9
|
+
var PAGE_SLUGS = {
|
|
10
|
+
cart: "cart",
|
|
11
|
+
orders: "orders",
|
|
12
|
+
order_detail: "transaction-detail",
|
|
13
|
+
tagihan: "tagihan",
|
|
14
|
+
invoice_detail: "invoice-detail",
|
|
15
|
+
calendar: "calendar",
|
|
16
|
+
gathering_plan: "plan-detail"
|
|
17
|
+
};
|
|
18
|
+
function list2(value) {
|
|
19
|
+
return Array.isArray(value) ? value : [];
|
|
20
|
+
}
|
|
21
|
+
function gatheringPaymentStatus(status) {
|
|
22
|
+
if (status === "PAID") return "PAID";
|
|
23
|
+
if (status === "REFUNDED") return "REFUNDED";
|
|
24
|
+
return "PENDING_PAYMENT";
|
|
25
|
+
}
|
|
26
|
+
function adaptCart(page) {
|
|
27
|
+
return list2(page.items).map((item) => ({
|
|
28
|
+
id: item.key,
|
|
29
|
+
key: item.key,
|
|
30
|
+
kind: item.kind,
|
|
31
|
+
name: item.name,
|
|
32
|
+
category: item.category,
|
|
33
|
+
subtitle: item.subtitle,
|
|
34
|
+
variant: item.variant,
|
|
35
|
+
emoji: item.emoji,
|
|
36
|
+
imageUrl: item.imageUrl,
|
|
37
|
+
price: item.unitPrice,
|
|
38
|
+
quantity: item.quantity,
|
|
39
|
+
quantity_editable: item.quantityEditable !== false,
|
|
40
|
+
max_quantity: item.maxQuantity,
|
|
41
|
+
can_checkout: item.checkoutable !== false,
|
|
42
|
+
blocked_reason: item.blockedReason,
|
|
43
|
+
detail_href: item.detailHref
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
function adaptTransactions(page) {
|
|
47
|
+
return list2(page.transactions).map((transaction) => ({
|
|
48
|
+
id: transaction.key,
|
|
49
|
+
key: transaction.key,
|
|
50
|
+
ref_number: transaction.reference,
|
|
51
|
+
status: transaction.status,
|
|
52
|
+
status_label: transaction.statusLabel,
|
|
53
|
+
created_at: transaction.createdAt,
|
|
54
|
+
total_amount: transaction.totalAmount,
|
|
55
|
+
item_count: transaction.itemCount,
|
|
56
|
+
has_outstanding_invoice: Boolean(transaction.outstanding),
|
|
57
|
+
outstanding_label: transaction.outstanding ? transaction.outstanding.label : void 0,
|
|
58
|
+
items: list2(transaction.itemNames).map((name) => ({ product_name: name })),
|
|
59
|
+
detail_href: transaction.detailHref
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
function adaptTransaction(page) {
|
|
63
|
+
const transaction = page.transaction || {};
|
|
64
|
+
const shipping = transaction.shipping || {};
|
|
65
|
+
return {
|
|
66
|
+
id: transaction.key,
|
|
67
|
+
key: transaction.key,
|
|
68
|
+
ref_number: transaction.reference,
|
|
69
|
+
status: transaction.status,
|
|
70
|
+
status_label: transaction.statusLabel,
|
|
71
|
+
status_message: transaction.statusMessage,
|
|
72
|
+
created_at: transaction.createdAt,
|
|
73
|
+
total_amount: transaction.totalAmount,
|
|
74
|
+
subtotal_amount: transaction.subtotalAmount,
|
|
75
|
+
payment_mode: transaction.paymentMode,
|
|
76
|
+
payment_mode_label: transaction.paymentModeLabel,
|
|
77
|
+
shipping_cost: transaction.shippingAmount,
|
|
78
|
+
recipient_name: shipping.recipient,
|
|
79
|
+
phone: shipping.phone,
|
|
80
|
+
address: shipping.address,
|
|
81
|
+
metadata: {
|
|
82
|
+
shipping: {
|
|
83
|
+
courier_service_name: shipping.courierLabel || transaction.courierLabel,
|
|
84
|
+
destination_area_name: shipping.areaLabel
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
items: list2(transaction.items).map((item) => ({
|
|
88
|
+
id: item.key,
|
|
89
|
+
key: item.key,
|
|
90
|
+
quantity: item.quantity,
|
|
91
|
+
unit_price: item.unitPrice,
|
|
92
|
+
total_amount: item.totalAmount,
|
|
93
|
+
product_name: item.name,
|
|
94
|
+
emoji: item.emoji,
|
|
95
|
+
detail_href: item.detailHref
|
|
96
|
+
}))
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function adaptInvoices(page) {
|
|
100
|
+
return list2(page.invoices).map((invoice) => {
|
|
101
|
+
if (invoice.kind === "gathering") {
|
|
102
|
+
return {
|
|
103
|
+
id: invoice.key,
|
|
104
|
+
key: invoice.key,
|
|
105
|
+
kind: "gathering",
|
|
106
|
+
invoice_id: invoice.label,
|
|
107
|
+
gathering_title: invoice.title,
|
|
108
|
+
amount: invoice.amount,
|
|
109
|
+
invoice_issued_at: invoice.status === "SCHEDULED" ? null : invoice.createdAt,
|
|
110
|
+
invoice_status: invoice.status === "SCHEDULED" ? "SCHEDULED" : "ISSUED",
|
|
111
|
+
payment_status: gatheringPaymentStatus(invoice.status),
|
|
112
|
+
payment_deadline: invoice.dueAt,
|
|
113
|
+
can_pay: invoice.canPay === true,
|
|
114
|
+
detail_href: invoice.detailHref,
|
|
115
|
+
transaction_href: invoice.transactionHref
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
id: invoice.key,
|
|
120
|
+
key: invoice.key,
|
|
121
|
+
kind: "termin",
|
|
122
|
+
sequence: invoice.sequence,
|
|
123
|
+
productName: invoice.title,
|
|
124
|
+
label: invoice.label,
|
|
125
|
+
amount: invoice.amount,
|
|
126
|
+
status: invoice.status,
|
|
127
|
+
anchorStepName: invoice.stepLabel,
|
|
128
|
+
createdAt: invoice.createdAt,
|
|
129
|
+
dueDate: invoice.dueAt,
|
|
130
|
+
can_pay: invoice.canPay === true,
|
|
131
|
+
detail_href: invoice.detailHref,
|
|
132
|
+
transaction_href: invoice.transactionHref
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function adaptInvoice(page) {
|
|
137
|
+
const invoice = page.invoice || {};
|
|
138
|
+
return {
|
|
139
|
+
key: invoice.key,
|
|
140
|
+
invoice_id: invoice.number,
|
|
141
|
+
plan_number: invoice.planNumber,
|
|
142
|
+
gathering_title: invoice.title,
|
|
143
|
+
attendee_name: invoice.attendeeName,
|
|
144
|
+
initiator_name: invoice.initiatorName,
|
|
145
|
+
amount: invoice.amount,
|
|
146
|
+
currency: page.currency,
|
|
147
|
+
payment_status: invoice.status === "PAID" || invoice.status === "REFUNDED" ? invoice.status : "UNPAID",
|
|
148
|
+
payment_open: page.canPay === true,
|
|
149
|
+
login_required: page.loginRequired === true,
|
|
150
|
+
payment_deadline: invoice.dueAt,
|
|
151
|
+
event_date: invoice.eventAt
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function adaptPlan(page) {
|
|
155
|
+
const plan = page.plan || {};
|
|
156
|
+
const occurrence = plan.occurrence || {};
|
|
157
|
+
const options = list2(occurrence.options);
|
|
158
|
+
return {
|
|
159
|
+
id: plan.key,
|
|
160
|
+
key: plan.key,
|
|
161
|
+
plan_number: plan.planNumber,
|
|
162
|
+
title: plan.title,
|
|
163
|
+
status: plan.status,
|
|
164
|
+
status_label: plan.statusLabel,
|
|
165
|
+
workflow_step: plan.workflowStep,
|
|
166
|
+
workflow_step_label: plan.workflowStepLabel,
|
|
167
|
+
invite_policy: plan.invitePolicy,
|
|
168
|
+
can_cancel: plan.canCancel === true,
|
|
169
|
+
public_invitation_href: plan.publicInvitationHref,
|
|
170
|
+
occurrence: {
|
|
171
|
+
status: occurrence.status,
|
|
172
|
+
status_label: occurrence.statusLabel,
|
|
173
|
+
price_per_seat: occurrence.seatPrice,
|
|
174
|
+
currency: page.currency,
|
|
175
|
+
deposit_amount_per_seat: occurrence.depositPerSeatAmount,
|
|
176
|
+
min_attendees: occurrence.minAttendees,
|
|
177
|
+
max_attendees: occurrence.maxAttendees,
|
|
178
|
+
rsvp_close_at: occurrence.rsvpCloseAt,
|
|
179
|
+
payment_deadline: occurrence.paymentDueAt,
|
|
180
|
+
final_schedule: occurrence.scheduledAt,
|
|
181
|
+
final_location: occurrence.location,
|
|
182
|
+
option_groups_snapshot: options.map((option) => ({
|
|
183
|
+
product_option_id: option.key,
|
|
184
|
+
option_group_key: option.group,
|
|
185
|
+
option_key: option.key,
|
|
186
|
+
label: option.label,
|
|
187
|
+
description: option.description,
|
|
188
|
+
venue_location: option.venue,
|
|
189
|
+
is_final_selection: option.isFinal === true
|
|
190
|
+
})),
|
|
191
|
+
opened_option_ids_snapshot: options.filter((option) => option.isOpen).map((option) => option.key),
|
|
192
|
+
voting_results: Object.fromEntries(
|
|
193
|
+
options.filter((option) => typeof option.votes === "number").map((option) => [option.key, option.votes])
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function adaptInvitations(page) {
|
|
199
|
+
return list2(page.invitations).map((invitation) => ({
|
|
200
|
+
key: invitation.key,
|
|
201
|
+
name: invitation.name,
|
|
202
|
+
status: invitation.status,
|
|
203
|
+
status_label: invitation.statusLabel,
|
|
204
|
+
channel: invitation.channel,
|
|
205
|
+
invite_href: invitation.inviteHref,
|
|
206
|
+
can_revoke: invitation.canRevoke === true
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
function adaptRegistrations(page) {
|
|
210
|
+
return list2(page.registrations).map((registration) => ({
|
|
211
|
+
key: registration.key,
|
|
212
|
+
name: registration.name,
|
|
213
|
+
registration_status: registration.registrationStatus,
|
|
214
|
+
payment_status: registration.paymentStatus,
|
|
215
|
+
status_label: registration.statusLabel,
|
|
216
|
+
invoice_amount: registration.invoiceAmount,
|
|
217
|
+
selected_options: list2(registration.selectedOptions),
|
|
218
|
+
rejection_message: registration.rejectionMessage,
|
|
219
|
+
can_reject: registration.canReject === true,
|
|
220
|
+
can_checkout: registration.canCheckout === true,
|
|
221
|
+
can_cancel_checkout: registration.canCancelCheckout === true,
|
|
222
|
+
can_refund: registration.canRefund === true
|
|
223
|
+
}));
|
|
224
|
+
}
|
|
225
|
+
function adaptOperation(page) {
|
|
226
|
+
const operation = page.operation;
|
|
227
|
+
if (!operation || typeof operation !== "object") return null;
|
|
228
|
+
return {
|
|
229
|
+
kind: operation.kind,
|
|
230
|
+
status: operation.status,
|
|
231
|
+
label: operation.label,
|
|
232
|
+
processed: operation.processedCount,
|
|
233
|
+
total: operation.totalCount,
|
|
234
|
+
failed: operation.failedCount,
|
|
235
|
+
message: operation.message
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function adaptCalendar(page) {
|
|
239
|
+
return {
|
|
240
|
+
title: "Kalender Acara",
|
|
241
|
+
month: page.initialMonth,
|
|
242
|
+
plans: list2(page.plans).map((plan) => ({
|
|
243
|
+
id: plan.key,
|
|
244
|
+
key: plan.key,
|
|
245
|
+
title: plan.title,
|
|
246
|
+
plan_number: plan.planNumber,
|
|
247
|
+
status: plan.status,
|
|
248
|
+
workflow_step_label: plan.stepLabel,
|
|
249
|
+
event_date: plan.eventAt,
|
|
250
|
+
payment_deadline: plan.paymentDueAt,
|
|
251
|
+
min_attendees: plan.minAttendees,
|
|
252
|
+
max_attendees: plan.maxAttendees,
|
|
253
|
+
detail_href: plan.detailHref
|
|
254
|
+
})),
|
|
255
|
+
invitations: list2(page.invitations).map((invitation) => ({
|
|
256
|
+
id: invitation.key,
|
|
257
|
+
key: invitation.key,
|
|
258
|
+
gathering_title: invitation.title,
|
|
259
|
+
plan_number: invitation.planNumber,
|
|
260
|
+
initiator_name: invitation.initiatorName,
|
|
261
|
+
event_date: invitation.eventAt,
|
|
262
|
+
event_location: invitation.location,
|
|
263
|
+
is_new: invitation.isNew === true,
|
|
264
|
+
needs_action: invitation.needsAction === true,
|
|
265
|
+
response: invitation.response,
|
|
266
|
+
action_label: invitation.responseLabel,
|
|
267
|
+
detail_href: invitation.detailHref
|
|
268
|
+
}))
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function adaptPage2(page) {
|
|
272
|
+
if (!page || typeof page !== "object" || !PAGE_SLUGS[page.type]) return null;
|
|
273
|
+
const base = {
|
|
274
|
+
type: page.type,
|
|
275
|
+
activePageSlug: PAGE_SLUGS[page.type],
|
|
276
|
+
actions: list2(page.actions),
|
|
277
|
+
timezone: typeof page.timezone === "string" ? page.timezone : "Asia/Jakarta"
|
|
278
|
+
};
|
|
279
|
+
switch (page.type) {
|
|
280
|
+
case "cart":
|
|
281
|
+
return { ...base, cart: adaptCart(page) };
|
|
282
|
+
case "orders":
|
|
283
|
+
return { ...base, transactions: adaptTransactions(page) };
|
|
284
|
+
case "order_detail":
|
|
285
|
+
return { ...base, transaction: adaptTransaction(page) };
|
|
286
|
+
case "tagihan":
|
|
287
|
+
return { ...base, invoices: adaptInvoices(page) };
|
|
288
|
+
case "invoice_detail":
|
|
289
|
+
return { ...base, invoice: adaptInvoice(page) };
|
|
290
|
+
case "calendar":
|
|
291
|
+
return { ...base, calendar: adaptCalendar(page) };
|
|
292
|
+
case "gathering_plan":
|
|
293
|
+
return {
|
|
294
|
+
...base,
|
|
295
|
+
plan: adaptPlan(page),
|
|
296
|
+
// Keputusan E3: tanpa email/kontak peserta.
|
|
297
|
+
invitees: list2(page.invitees).map((invitee) => ({
|
|
298
|
+
name: invitee.name,
|
|
299
|
+
rsvp_status: invitee.rsvpStatus,
|
|
300
|
+
rsvp_label: invitee.rsvpLabel
|
|
301
|
+
})),
|
|
302
|
+
// Kontrak v2: data pengelolaan initiator (tanpa kontak peserta).
|
|
303
|
+
invitations: adaptInvitations(page),
|
|
304
|
+
registrations: adaptRegistrations(page),
|
|
305
|
+
operation: adaptOperation(page),
|
|
306
|
+
viewerRole: page.viewerRole
|
|
307
|
+
};
|
|
308
|
+
default:
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
module2.exports = { adaptPage: adaptPage2, PAGE_SLUGS };
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
1
316
|
// src/server.cjs
|
|
2
317
|
var React = require("react");
|
|
318
|
+
var { adaptPage } = require_page_adapter();
|
|
3
319
|
var h = React.createElement;
|
|
4
320
|
var defaultColors = {
|
|
5
321
|
background: "#F0F7F8",
|
|
@@ -15,6 +331,12 @@ var defaultColors = {
|
|
|
15
331
|
function text(value, fallback = "") {
|
|
16
332
|
return typeof value === "string" && value.trim() ? value : fallback;
|
|
17
333
|
}
|
|
334
|
+
function intentEnabled(props, action) {
|
|
335
|
+
return Boolean(props.bridgeVersion) && list(props.kumpulPage && props.kumpulPage.actions).includes(action);
|
|
336
|
+
}
|
|
337
|
+
function intentAttributes(action, key, extra = {}) {
|
|
338
|
+
return { "data-bagdja-intent": action, ...key ? { "data-bagdja-key": key } : {}, ...extra };
|
|
339
|
+
}
|
|
18
340
|
function list(value) {
|
|
19
341
|
return Array.isArray(value) ? value : [];
|
|
20
342
|
}
|
|
@@ -47,7 +369,9 @@ function billingStatus(invoice) {
|
|
|
47
369
|
return {
|
|
48
370
|
SCHEDULED: "scheduled",
|
|
49
371
|
ISSUED: "issued",
|
|
372
|
+
OVERDUE: "issued",
|
|
50
373
|
PAID: "paid",
|
|
374
|
+
REFUNDED: "refunded",
|
|
51
375
|
CANCELLED: "cancelled"
|
|
52
376
|
}[invoice.status] || "scheduled";
|
|
53
377
|
}
|
|
@@ -84,7 +408,7 @@ var transactionFilters = [
|
|
|
84
408
|
["cancelled", "Dibatalkan"]
|
|
85
409
|
];
|
|
86
410
|
function CartSection({ props }) {
|
|
87
|
-
const cartItems = props.
|
|
411
|
+
const cartItems = list(props.kumpulPage && props.kumpulPage.cart);
|
|
88
412
|
const displayCount = cartItems.filter((item) => item.kind !== "gathering_plan").reduce((count, item) => count + (Number(item.quantity) || 1), 0);
|
|
89
413
|
const selectableCount = cartItems.filter((item) => item.can_checkout !== false && item.kind !== "gathering_plan").length;
|
|
90
414
|
return h(
|
|
@@ -149,6 +473,7 @@ function CartSection({ props }) {
|
|
|
149
473
|
defaultChecked: canCheckout,
|
|
150
474
|
disabled: !canCheckout,
|
|
151
475
|
"data-cart-select": "",
|
|
476
|
+
...canCheckout && item.key ? { "data-bagdja-selectable": "", "data-bagdja-key": item.key } : {},
|
|
152
477
|
"aria-label": canCheckout ? `Pilih ${text(item.name, "item keranjang")}` : `${text(item.name, "Item")} belum bisa checkout`
|
|
153
478
|
})
|
|
154
479
|
),
|
|
@@ -173,19 +498,23 @@ function CartSection({ props }) {
|
|
|
173
498
|
type: "button",
|
|
174
499
|
"aria-label": `Kurangi jumlah ${text(item.name, "item")}`,
|
|
175
500
|
"data-cart-quantity-decrease": "",
|
|
176
|
-
disabled: quantity <= 1
|
|
501
|
+
disabled: quantity <= 1 || item.quantity_editable === false,
|
|
502
|
+
...item.key && quantity > 1 ? intentAttributes("cart.set_quantity", item.key, { "data-bagdja-quantity": String(quantity - 1) }) : {}
|
|
177
503
|
}, "\u2212"),
|
|
178
504
|
h("span", { "data-cart-quantity": "" }, String(quantity)),
|
|
179
505
|
h("button", {
|
|
180
506
|
type: "button",
|
|
181
507
|
"aria-label": `Tambah jumlah ${text(item.name, "item")}`,
|
|
182
|
-
"data-cart-quantity-increase": ""
|
|
508
|
+
"data-cart-quantity-increase": "",
|
|
509
|
+
disabled: item.quantity_editable === false || Number(item.max_quantity) > 0 && quantity >= Number(item.max_quantity),
|
|
510
|
+
...item.key ? intentAttributes("cart.set_quantity", item.key, { "data-bagdja-quantity": String(quantity + 1) }) : {}
|
|
183
511
|
}, "+")
|
|
184
512
|
) : null,
|
|
185
513
|
h("button", {
|
|
186
514
|
type: "button",
|
|
187
515
|
className: "kumpul-cart-remove",
|
|
188
516
|
"data-cart-remove": "",
|
|
517
|
+
...item.key ? intentAttributes("cart.remove", item.key) : {},
|
|
189
518
|
"aria-label": `Hapus ${text(item.name, "item")}`
|
|
190
519
|
}, "Hapus")
|
|
191
520
|
)
|
|
@@ -209,7 +538,7 @@ function CartSection({ props }) {
|
|
|
209
538
|
h("span", null, "Total sementara"),
|
|
210
539
|
h("strong", { "data-cart-selected-total": "" }, "Rp 0")
|
|
211
540
|
),
|
|
212
|
-
h("button", { type: "button", className: "kumpul-cart-checkout", disabled:
|
|
541
|
+
h("button", { type: "button", className: "kumpul-cart-checkout", disabled: !intentEnabled(props, "cart.checkout"), ...intentAttributes("cart.checkout") }, "Lanjut ke Checkout"),
|
|
213
542
|
h("p", null, "Item yang belum dapat dibayar akan tetap tersimpan di keranjang.")
|
|
214
543
|
)
|
|
215
544
|
),
|
|
@@ -243,7 +572,7 @@ function transactionStatus(transaction) {
|
|
|
243
572
|
};
|
|
244
573
|
}
|
|
245
574
|
function TransactionsSection({ props }) {
|
|
246
|
-
const transactions = props.
|
|
575
|
+
const transactions = list(props.kumpulPage && props.kumpulPage.transactions);
|
|
247
576
|
const counts = Object.fromEntries(transactionFilters.map(([key]) => [
|
|
248
577
|
key,
|
|
249
578
|
key === "all" ? transactions.length : transactions.filter((transaction) => transactionStatus(transaction).filter === key).length
|
|
@@ -343,9 +672,9 @@ function TransactionsSection({ props }) {
|
|
|
343
672
|
h(
|
|
344
673
|
"div",
|
|
345
674
|
{ className: "kumpul-transaction-actions" },
|
|
346
|
-
transaction.status === "PENDING_PAYMENT" ? h("
|
|
347
|
-
h("button", { type: "button", disabled: true }, "Detail Transaksi"),
|
|
348
|
-
h("button", { type: "button", disabled: true }, "Chat Order")
|
|
675
|
+
transaction.status === "PENDING_PAYMENT" && transaction.detail_href ? h("a", { className: "kumpul-transaction-action-link", href: transaction.detail_href }, "Lanjutkan Pembayaran") : null,
|
|
676
|
+
transaction.detail_href ? h("a", { className: "kumpul-transaction-action-link", href: transaction.detail_href }, "Detail Transaksi") : h("button", { type: "button", disabled: true }, "Detail Transaksi"),
|
|
677
|
+
props.auth && props.auth.chatHref ? h("a", { className: "kumpul-transaction-action-link", href: props.auth.chatHref }, "Chat Order") : h("button", { type: "button", disabled: true }, "Chat Order")
|
|
349
678
|
)
|
|
350
679
|
);
|
|
351
680
|
}),
|
|
@@ -372,7 +701,8 @@ function invoiceDetailStatus(invoice) {
|
|
|
372
701
|
};
|
|
373
702
|
}
|
|
374
703
|
function InvoiceDetailSection({ props }) {
|
|
375
|
-
|
|
704
|
+
const invoice = props.kumpulPage && props.kumpulPage.invoice;
|
|
705
|
+
if (!invoice) {
|
|
376
706
|
return h(
|
|
377
707
|
"section",
|
|
378
708
|
{ className: "kumpul-detail-page", "data-invoice-detail": "" },
|
|
@@ -380,7 +710,6 @@ function InvoiceDetailSection({ props }) {
|
|
|
380
710
|
h("p", null, "Data tagihan dan status pembayaran dikelola oleh host Bagdja.")
|
|
381
711
|
);
|
|
382
712
|
}
|
|
383
|
-
const invoice = props.isPreview === true ? props.previewInvoice || {} : {};
|
|
384
713
|
const status = invoiceDetailStatus(invoice);
|
|
385
714
|
const amount = new Intl.NumberFormat("id-ID", {
|
|
386
715
|
style: "currency",
|
|
@@ -454,17 +783,21 @@ function InvoiceDetailSection({ props }) {
|
|
|
454
783
|
h("h3", null, "Mengapa perlu login untuk membayar?"),
|
|
455
784
|
h("p", null, "Akun Bagdja menghubungkan pembayaran escrow dengan peserta. Gunakan email yang sama dengan email saat RSVP. Initiator juga dapat membayar beberapa tagihan dari halaman gathering.")
|
|
456
785
|
) : null,
|
|
457
|
-
!isPaid ? h(
|
|
786
|
+
!isPaid && paymentOpen && invoice.login_required && props.auth && props.auth.loginHref ? h("a", { className: "kumpul-detail-pay-link", href: props.auth.loginHref }, "Login untuk membayar") : !isPaid ? h(
|
|
458
787
|
"button",
|
|
459
|
-
{
|
|
460
|
-
|
|
788
|
+
{
|
|
789
|
+
type: "button",
|
|
790
|
+
disabled: !paymentOpen || !intentEnabled(props, "invoice.pay"),
|
|
791
|
+
...intentAttributes("invoice.pay", invoice.key)
|
|
792
|
+
},
|
|
793
|
+
paymentOpen ? isPending ? "Lanjutkan pembayaran" : "Bayar sekarang" : "Pembayaran belum dibuka"
|
|
461
794
|
) : null
|
|
462
795
|
)
|
|
463
796
|
)
|
|
464
797
|
);
|
|
465
798
|
}
|
|
466
799
|
function TransactionDetailSection({ props, section }) {
|
|
467
|
-
const transaction = props.
|
|
800
|
+
const transaction = props.kumpulPage && props.kumpulPage.transaction || section && section.content && section.content.transaction || {};
|
|
468
801
|
const items = list(transaction.items);
|
|
469
802
|
const status = transactionStatus(transaction);
|
|
470
803
|
const subtotal = items.reduce((sum, item) => sum + (Number(item.total_amount) || 0), 0);
|
|
@@ -574,7 +907,8 @@ function TransactionDetailSection({ props, section }) {
|
|
|
574
907
|
transaction.status === "PENDING_PAYMENT" || transaction.status === "PENDING" ? h(
|
|
575
908
|
React.Fragment,
|
|
576
909
|
null,
|
|
577
|
-
|
|
910
|
+
// order.* memakai jalur aksi transaksi host yang sudah ada (data-bagdja-action).
|
|
911
|
+
h("button", { type: "button", disabled: !intentEnabled(props, "order.retry_payment"), "data-bagdja-action": "order.retry_payment" }, "Lanjutkan Pembayaran"),
|
|
578
912
|
transaction.payment_mode === "ESCROW" ? h("p", { className: "kumpul-detail-payment-note" }, "Dana escrow disimpan sampai proses konfirmasi pesanan selesai.") : null
|
|
579
913
|
) : h(
|
|
580
914
|
"p",
|
|
@@ -605,7 +939,7 @@ function GatheringPlanSimulator({ plan, props }) {
|
|
|
605
939
|
const occurrence = plan.occurrence || {};
|
|
606
940
|
const options = list(occurrence.option_groups_snapshot);
|
|
607
941
|
const openedIds = new Set(list(occurrence.opened_option_ids_snapshot));
|
|
608
|
-
const invitees = list(props.
|
|
942
|
+
const invitees = list(props.kumpulPage && props.kumpulPage.invitees);
|
|
609
943
|
const localDatePart = (value) => typeof value === "string" ? value.slice(0, 10) : "";
|
|
610
944
|
const localTimePart = (value) => typeof value === "string" ? value.slice(11, 16) : "";
|
|
611
945
|
return h(
|
|
@@ -886,10 +1220,399 @@ function GatheringPlanSimulator({ plan, props }) {
|
|
|
886
1220
|
)
|
|
887
1221
|
);
|
|
888
1222
|
}
|
|
1223
|
+
function jakartaInputValue(value) {
|
|
1224
|
+
const time = typeof value === "string" ? Date.parse(value) : Number.NaN;
|
|
1225
|
+
return Number.isFinite(time) ? new Date(time + 7 * 3600 * 1e3).toISOString().slice(0, 16) : "";
|
|
1226
|
+
}
|
|
1227
|
+
function planDateTime(value) {
|
|
1228
|
+
const date = formatCalendarDate(value);
|
|
1229
|
+
const time = formatCalendarTime(value);
|
|
1230
|
+
return date ? `${date}${time ? ` \xB7 ${time} WIB` : ""}` : "Belum ditentukan";
|
|
1231
|
+
}
|
|
1232
|
+
var invitationChannels = {
|
|
1233
|
+
email: "Email",
|
|
1234
|
+
whatsapp: "WhatsApp",
|
|
1235
|
+
email_whatsapp: "Email & WhatsApp",
|
|
1236
|
+
public: "Tautan terbuka"
|
|
1237
|
+
};
|
|
1238
|
+
function PlanOperationNotice({ operation, kinds }) {
|
|
1239
|
+
if (!operation || !kinds.includes(operation.kind)) return null;
|
|
1240
|
+
const failed = operation.status === "FAILED";
|
|
1241
|
+
return h(
|
|
1242
|
+
"p",
|
|
1243
|
+
{ className: `kumpul-plan-live-operation${failed ? " is-failed" : ""}`, role: "status" },
|
|
1244
|
+
h("strong", null, failed ? `${operation.label} gagal` : `${operation.label}\u2026`),
|
|
1245
|
+
` ${Number(operation.processed) || 0}/${Number(operation.total) || 0} diproses`,
|
|
1246
|
+
Number(operation.failed) ? ` \xB7 ${operation.failed} gagal` : "",
|
|
1247
|
+
operation.message ? ` \xB7 ${operation.message}` : "",
|
|
1248
|
+
failed ? null : " \xB7 muat ulang halaman untuk melihat progres terbaru."
|
|
1249
|
+
);
|
|
1250
|
+
}
|
|
1251
|
+
function PlanSummaryFields({ plan, openedOptions }) {
|
|
1252
|
+
const occurrence = plan.occurrence || {};
|
|
1253
|
+
return h(
|
|
1254
|
+
"div",
|
|
1255
|
+
null,
|
|
1256
|
+
h(
|
|
1257
|
+
"dl",
|
|
1258
|
+
{ className: "kumpul-detail-fields" },
|
|
1259
|
+
h("div", null, h("dt", null, "Nama rencana"), h("dd", null, text(plan.title, "Rencana gathering"))),
|
|
1260
|
+
h("div", null, h("dt", null, "Akses peserta"), h("dd", null, plan.invite_policy === "INVITE_ONLY" ? "Khusus undangan" : "Terbuka")),
|
|
1261
|
+
h("div", null, h("dt", null, "Batas reservasi"), h("dd", null, planDateTime(occurrence.rsvp_close_at))),
|
|
1262
|
+
h("div", null, h("dt", null, "Batas pembayaran"), h("dd", null, planDateTime(occurrence.payment_deadline))),
|
|
1263
|
+
h("div", null, h("dt", null, "Tanggal acara"), h("dd", null, planDateTime(occurrence.final_schedule))),
|
|
1264
|
+
h("div", null, h("dt", null, "Pilihan dibuka"), h(
|
|
1265
|
+
"dd",
|
|
1266
|
+
null,
|
|
1267
|
+
openedOptions.length ? openedOptions.map((option) => `${text(option.option_group_key, "Pilihan")} \xB7 ${text(option.label)}`).join(", ") : "Belum ada"
|
|
1268
|
+
))
|
|
1269
|
+
)
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
function PlanPeopleList({ registrations, selectable, selectAction, props, rowActions }) {
|
|
1273
|
+
if (!registrations.length) {
|
|
1274
|
+
return h("p", { className: "kumpul-plan-sim-help" }, "Belum ada peserta yang mengonfirmasi kehadiran.");
|
|
1275
|
+
}
|
|
1276
|
+
return h(
|
|
1277
|
+
"ul",
|
|
1278
|
+
{ className: "kumpul-plan-live-people" },
|
|
1279
|
+
...registrations.map((registration) => h(
|
|
1280
|
+
"li",
|
|
1281
|
+
{ key: registration.key, className: "kumpul-plan-sim-person" },
|
|
1282
|
+
h(
|
|
1283
|
+
"div",
|
|
1284
|
+
{ className: "kumpul-plan-sim-person-heading" },
|
|
1285
|
+
h(
|
|
1286
|
+
"label",
|
|
1287
|
+
{ className: "kumpul-plan-live-person-name" },
|
|
1288
|
+
selectable(registration) ? h("input", {
|
|
1289
|
+
type: "checkbox",
|
|
1290
|
+
"data-bagdja-selectable": "",
|
|
1291
|
+
"data-bagdja-key": registration.key,
|
|
1292
|
+
disabled: !intentEnabled(props, selectAction),
|
|
1293
|
+
"aria-label": `Pilih ${text(registration.name, "peserta")}`
|
|
1294
|
+
}) : null,
|
|
1295
|
+
h("strong", null, text(registration.name, "Peserta"))
|
|
1296
|
+
),
|
|
1297
|
+
h("span", null, [
|
|
1298
|
+
registration.status_label,
|
|
1299
|
+
list(registration.selected_options).join(", "),
|
|
1300
|
+
Number.isFinite(Number(registration.invoice_amount)) ? formatCurrency(registration.invoice_amount) : ""
|
|
1301
|
+
].filter(Boolean).join(" \xB7 ")),
|
|
1302
|
+
registration.rejection_message ? h("span", null, `Alasan: ${registration.rejection_message}`) : null
|
|
1303
|
+
),
|
|
1304
|
+
rowActions ? h("div", { className: "kumpul-plan-live-row-actions" }, ...rowActions(registration)) : null
|
|
1305
|
+
))
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
function LivePlanWorkflow({ plan, props }) {
|
|
1309
|
+
const page = props.kumpulPage || {};
|
|
1310
|
+
const occurrence = plan.occurrence || {};
|
|
1311
|
+
const options = list(occurrence.option_groups_snapshot);
|
|
1312
|
+
const openedIds = new Set(list(occurrence.opened_option_ids_snapshot));
|
|
1313
|
+
const openedOptions = options.filter((option) => openedIds.has(option.product_option_id));
|
|
1314
|
+
const invitations = list(page.invitations);
|
|
1315
|
+
const privateInvitations = invitations.filter((invitation) => invitation.channel !== "public");
|
|
1316
|
+
const registrations = list(page.registrations);
|
|
1317
|
+
const activeRegistrations = registrations.filter((registration) => registration.registration_status === "RSVP_CONFIRMED");
|
|
1318
|
+
const paidRegistrations = activeRegistrations.filter((registration) => registration.payment_status === "PAID");
|
|
1319
|
+
const operation = page.operation;
|
|
1320
|
+
const stepIndex = gatheringWorkflowSteps.findIndex((step) => step.key === plan.workflow_step);
|
|
1321
|
+
const finished = stepIndex < 0;
|
|
1322
|
+
const currentIndex = finished ? gatheringWorkflowSteps.length - 1 : stepIndex;
|
|
1323
|
+
const has = (action) => list(page.actions).includes(action);
|
|
1324
|
+
const button = (action, label, extra = {}, className = "kumpul-plan-sim-primary") => h("button", {
|
|
1325
|
+
type: "button",
|
|
1326
|
+
className,
|
|
1327
|
+
disabled: !intentEnabled(props, action),
|
|
1328
|
+
...intentAttributes(action, plan.key, extra)
|
|
1329
|
+
}, label);
|
|
1330
|
+
const minMax = `min. ${Number(occurrence.min_attendees) || 0} \xB7 maks. ${Number(occurrence.max_attendees) || 0}`;
|
|
1331
|
+
const publicLink = plan.invite_policy === "OPEN" && plan.public_invitation_href ? h(
|
|
1332
|
+
"p",
|
|
1333
|
+
{ className: "kumpul-plan-live-public" },
|
|
1334
|
+
"Undangan terbuka: ",
|
|
1335
|
+
h("a", { href: plan.public_invitation_href }, "Buka halaman undangan"),
|
|
1336
|
+
" \u2014 bagikan tautan halaman tersebut ke calon peserta."
|
|
1337
|
+
) : null;
|
|
1338
|
+
const planPanel = (editable) => editable && has("gathering.plan.save") ? h(
|
|
1339
|
+
"div",
|
|
1340
|
+
{ "data-bagdja-scope": "" },
|
|
1341
|
+
h("p", { className: "kumpul-plan-sim-help" }, "Tetapkan akses undangan, tenggat, tanggal acara, dan pilihan produk yang dibuka untuk peserta."),
|
|
1342
|
+
h(
|
|
1343
|
+
"div",
|
|
1344
|
+
{ className: "kumpul-plan-sim-form" },
|
|
1345
|
+
h(
|
|
1346
|
+
"label",
|
|
1347
|
+
null,
|
|
1348
|
+
"Nama rencana",
|
|
1349
|
+
h("input", { type: "text", required: true, minLength: 3, maxLength: 255, defaultValue: text(plan.title), "data-bagdja-field": "title" })
|
|
1350
|
+
),
|
|
1351
|
+
h(
|
|
1352
|
+
"label",
|
|
1353
|
+
null,
|
|
1354
|
+
"Akses peserta",
|
|
1355
|
+
h(
|
|
1356
|
+
"select",
|
|
1357
|
+
{ defaultValue: plan.invite_policy === "INVITE_ONLY" ? "INVITE_ONLY" : "OPEN", "data-bagdja-field": "invitePolicy" },
|
|
1358
|
+
h("option", { value: "OPEN" }, "Terbuka"),
|
|
1359
|
+
h("option", { value: "INVITE_ONLY" }, "Khusus undangan")
|
|
1360
|
+
)
|
|
1361
|
+
)
|
|
1362
|
+
),
|
|
1363
|
+
h(
|
|
1364
|
+
"div",
|
|
1365
|
+
{ className: "kumpul-plan-sim-form kumpul-plan-live-dates" },
|
|
1366
|
+
...[
|
|
1367
|
+
["rsvpCloseAt", "Batas reservasi", occurrence.rsvp_close_at],
|
|
1368
|
+
["paymentDueAt", "Batas pembayaran", occurrence.payment_deadline],
|
|
1369
|
+
["scheduledAt", "Tanggal acara", occurrence.final_schedule]
|
|
1370
|
+
].map(([field, label, value]) => h(
|
|
1371
|
+
"label",
|
|
1372
|
+
{ key: field },
|
|
1373
|
+
`${label} (WIB)`,
|
|
1374
|
+
h("input", { type: "datetime-local", defaultValue: jakartaInputValue(value), "data-bagdja-field": field })
|
|
1375
|
+
))
|
|
1376
|
+
),
|
|
1377
|
+
h(
|
|
1378
|
+
"fieldset",
|
|
1379
|
+
{ className: "kumpul-plan-sim-options" },
|
|
1380
|
+
h("legend", null, "Pilihan dari produk yang dibuka"),
|
|
1381
|
+
options.length ? options.map((option) => h(
|
|
1382
|
+
"label",
|
|
1383
|
+
{ key: option.product_option_id, className: "kumpul-plan-sim-option" },
|
|
1384
|
+
h("input", { type: "checkbox", value: option.product_option_id, defaultChecked: openedIds.has(option.product_option_id), "data-bagdja-field": "optionKeys" }),
|
|
1385
|
+
h(
|
|
1386
|
+
"span",
|
|
1387
|
+
null,
|
|
1388
|
+
h("strong", null, `${text(option.option_group_key, "Pilihan")} \xB7 ${text(option.label)}`),
|
|
1389
|
+
option.venue_location || option.description ? h("small", null, [option.venue_location, option.description].filter(Boolean).join(" \xB7 ")) : null
|
|
1390
|
+
)
|
|
1391
|
+
)) : h("p", null, "Produk ini tidak memiliki pilihan.")
|
|
1392
|
+
),
|
|
1393
|
+
h(
|
|
1394
|
+
"div",
|
|
1395
|
+
{ className: "kumpul-plan-sim-actions" },
|
|
1396
|
+
button("gathering.plan.save", "Simpan", {}, "kumpul-plan-sim-secondary"),
|
|
1397
|
+
button("gathering.plan.save", "Submit & lanjut buat undangan", { "data-bagdja-submit": "true" })
|
|
1398
|
+
)
|
|
1399
|
+
) : h(PlanSummaryFields, { plan, openedOptions });
|
|
1400
|
+
const invitationsPanel = (editable) => h(
|
|
1401
|
+
"div",
|
|
1402
|
+
null,
|
|
1403
|
+
h("p", { className: "kumpul-plan-sim-help" }, plan.invite_policy === "INVITE_ONLY" ? "Rencana khusus undangan: tambahkan calon peserta lewat email atau WhatsApp, lalu kirim undangan." : "Rencana terbuka: undangan publik dibuat saat undangan dikirim, lalu siapa pun dengan tautan bisa RSVP."),
|
|
1404
|
+
publicLink,
|
|
1405
|
+
editable && has("gathering.invitation.add") ? h(
|
|
1406
|
+
"div",
|
|
1407
|
+
{ className: "kumpul-plan-sim-invite-form", "data-bagdja-scope": "" },
|
|
1408
|
+
h("label", null, "Nama calon peserta", h("input", { type: "text", maxLength: 120, placeholder: "Nama peserta", "data-bagdja-field": "invitee.name" })),
|
|
1409
|
+
h("label", null, "Email", h("input", { type: "email", maxLength: 254, placeholder: "nama@email.com", "data-bagdja-field": "invitee.email" })),
|
|
1410
|
+
h("label", null, "WhatsApp", h("input", { type: "tel", maxLength: 20, placeholder: "+628123456789", "data-bagdja-field": "invitee.whatsapp" })),
|
|
1411
|
+
button("gathering.invitation.add", "Tambah peserta", {}, "")
|
|
1412
|
+
) : null,
|
|
1413
|
+
privateInvitations.length ? h(
|
|
1414
|
+
"ul",
|
|
1415
|
+
{ className: "kumpul-plan-live-people" },
|
|
1416
|
+
...privateInvitations.map((invitation) => h(
|
|
1417
|
+
"li",
|
|
1418
|
+
{ key: invitation.key, className: "kumpul-plan-sim-person" },
|
|
1419
|
+
h(
|
|
1420
|
+
"div",
|
|
1421
|
+
{ className: "kumpul-plan-sim-person-heading" },
|
|
1422
|
+
h("strong", null, text(invitation.name, "Peserta")),
|
|
1423
|
+
h("span", null, `${invitationChannels[invitation.channel] || "Undangan"} \xB7 ${text(invitation.status_label)}`)
|
|
1424
|
+
),
|
|
1425
|
+
h(
|
|
1426
|
+
"div",
|
|
1427
|
+
{ className: "kumpul-plan-live-row-actions" },
|
|
1428
|
+
invitation.invite_href ? h("a", { href: invitation.invite_href }, "Lihat undangan") : null,
|
|
1429
|
+
editable && invitation.can_revoke && has("gathering.invitation.revoke") ? h("button", {
|
|
1430
|
+
type: "button",
|
|
1431
|
+
disabled: !intentEnabled(props, "gathering.invitation.revoke"),
|
|
1432
|
+
...intentAttributes("gathering.invitation.revoke", plan.key, { "data-bagdja-target": invitation.key })
|
|
1433
|
+
}, "Cabut") : null
|
|
1434
|
+
)
|
|
1435
|
+
))
|
|
1436
|
+
) : plan.invite_policy === "INVITE_ONLY" ? h("p", { className: "kumpul-plan-sim-help" }, "Belum ada calon peserta.") : null,
|
|
1437
|
+
h(PlanOperationNotice, { operation, kinds: ["INVITATION_DISPATCH", "INVITATION_REVOCATION"] }),
|
|
1438
|
+
editable && has("gathering.invitations.submit") ? h("div", { className: "kumpul-plan-sim-actions" }, button("gathering.invitations.submit", "Kirim undangan")) : null
|
|
1439
|
+
);
|
|
1440
|
+
const confirmationPanel = (editable) => {
|
|
1441
|
+
const canReject = editable && has("gathering.registrations.reject");
|
|
1442
|
+
return h(
|
|
1443
|
+
"div",
|
|
1444
|
+
{ "data-bagdja-scope": "" },
|
|
1445
|
+
h("p", { className: "kumpul-plan-sim-help" }, `Peserta hadir ${activeRegistrations.length} (${minMax}). Jumlah harus memenuhi batas produk sebelum RSVP ditutup.`),
|
|
1446
|
+
editable ? publicLink : null,
|
|
1447
|
+
h(PlanPeopleList, {
|
|
1448
|
+
registrations,
|
|
1449
|
+
props,
|
|
1450
|
+
selectAction: "gathering.registrations.reject",
|
|
1451
|
+
selectable: (registration) => canReject && registration.can_reject
|
|
1452
|
+
}),
|
|
1453
|
+
canReject ? h(
|
|
1454
|
+
"label",
|
|
1455
|
+
{ className: "kumpul-plan-live-reason" },
|
|
1456
|
+
"Alasan penolakan untuk peserta terpilih",
|
|
1457
|
+
h("textarea", { rows: 2, maxLength: 2e3, "data-bagdja-field": "message" })
|
|
1458
|
+
) : null,
|
|
1459
|
+
editable && (canReject || has("gathering.reservations.confirm")) ? h(
|
|
1460
|
+
"div",
|
|
1461
|
+
{ className: "kumpul-plan-sim-actions" },
|
|
1462
|
+
canReject ? button("gathering.registrations.reject", "Tolak peserta terpilih", {}, "kumpul-plan-sim-secondary") : null,
|
|
1463
|
+
has("gathering.reservations.confirm") ? button("gathering.reservations.confirm", "Tutup RSVP & buka pembayaran") : null
|
|
1464
|
+
) : null
|
|
1465
|
+
);
|
|
1466
|
+
};
|
|
1467
|
+
const paymentPanel = (editable) => {
|
|
1468
|
+
const canCheckout = editable && has("gathering.registrations.checkout");
|
|
1469
|
+
const groups = [...new Set(openedOptions.map((option) => text(option.option_group_key, "Pilihan")))];
|
|
1470
|
+
const deposit = Number(occurrence.deposit_amount_per_seat) || 0;
|
|
1471
|
+
return h(
|
|
1472
|
+
"div",
|
|
1473
|
+
{ "data-bagdja-scope": "" },
|
|
1474
|
+
h(
|
|
1475
|
+
"p",
|
|
1476
|
+
{ className: "kumpul-plan-sim-help" },
|
|
1477
|
+
`Peserta lunas ${paidRegistrations.length} dari ${activeRegistrations.length} (${minMax}).`,
|
|
1478
|
+
deposit ? ` DP ${formatCurrency(deposit * paidRegistrations.length)} dicairkan ke penyelenggara saat acara dikonfirmasi.` : ""
|
|
1479
|
+
),
|
|
1480
|
+
h(PlanOperationNotice, { operation, kinds: ["INVOICE_ISSUANCE"] }),
|
|
1481
|
+
h(PlanPeopleList, {
|
|
1482
|
+
registrations: activeRegistrations,
|
|
1483
|
+
props,
|
|
1484
|
+
selectAction: "gathering.registrations.checkout",
|
|
1485
|
+
selectable: (registration) => canCheckout && registration.can_checkout,
|
|
1486
|
+
rowActions: editable ? (registration) => [
|
|
1487
|
+
registration.can_cancel_checkout && has("gathering.registration.cancel_checkout") ? h("button", {
|
|
1488
|
+
type: "button",
|
|
1489
|
+
key: "cancel",
|
|
1490
|
+
disabled: !intentEnabled(props, "gathering.registration.cancel_checkout"),
|
|
1491
|
+
...intentAttributes("gathering.registration.cancel_checkout", plan.key, { "data-bagdja-target": registration.key })
|
|
1492
|
+
}, "Batalkan checkout") : null,
|
|
1493
|
+
registration.can_refund && has("gathering.registration.refund") ? h("button", {
|
|
1494
|
+
type: "button",
|
|
1495
|
+
key: "refund",
|
|
1496
|
+
disabled: !intentEnabled(props, "gathering.registration.refund"),
|
|
1497
|
+
...intentAttributes("gathering.registration.refund", plan.key, { "data-bagdja-target": registration.key })
|
|
1498
|
+
}, "Refund") : null
|
|
1499
|
+
] : null
|
|
1500
|
+
}),
|
|
1501
|
+
editable && (canCheckout || has("gathering.invoices.resend")) ? h(
|
|
1502
|
+
"div",
|
|
1503
|
+
{ className: "kumpul-plan-sim-actions" },
|
|
1504
|
+
has("gathering.invoices.resend") ? button("gathering.invoices.resend", "Kirim ulang invoice", {}, "kumpul-plan-sim-secondary") : null,
|
|
1505
|
+
canCheckout ? button("gathering.registrations.checkout", "Bayarkan peserta terpilih", {}, "kumpul-plan-sim-secondary") : null
|
|
1506
|
+
) : null,
|
|
1507
|
+
h(
|
|
1508
|
+
"fieldset",
|
|
1509
|
+
{ className: "kumpul-plan-sim-options" },
|
|
1510
|
+
h("legend", null, "Opsi final gathering"),
|
|
1511
|
+
groups.length ? groups.map((group) => h(
|
|
1512
|
+
"div",
|
|
1513
|
+
{ key: group, className: "kumpul-plan-sim-final-group" },
|
|
1514
|
+
h("strong", null, group),
|
|
1515
|
+
...openedOptions.filter((option) => text(option.option_group_key, "Pilihan") === group).map((option) => {
|
|
1516
|
+
const votes = Number((occurrence.voting_results || {})[option.product_option_id]);
|
|
1517
|
+
const voteLabel = Number.isFinite(votes) ? ` \xB7 ${votes} suara` : "";
|
|
1518
|
+
return editable && has("gathering.event.confirm") ? h(
|
|
1519
|
+
"label",
|
|
1520
|
+
{ key: option.product_option_id },
|
|
1521
|
+
h("input", {
|
|
1522
|
+
type: "radio",
|
|
1523
|
+
name: `kumpul-final-${group}`,
|
|
1524
|
+
value: option.product_option_id,
|
|
1525
|
+
defaultChecked: option.is_final_selection === true,
|
|
1526
|
+
"data-bagdja-field": "optionKeys"
|
|
1527
|
+
}),
|
|
1528
|
+
`${text(option.label)}${voteLabel}`
|
|
1529
|
+
) : h(
|
|
1530
|
+
"p",
|
|
1531
|
+
{ key: option.product_option_id },
|
|
1532
|
+
`${text(option.label)}${option.is_final_selection ? " \xB7 opsi final" : ""}${voteLabel}`
|
|
1533
|
+
);
|
|
1534
|
+
})
|
|
1535
|
+
)) : h("p", null, "Tidak ada pilihan yang perlu ditetapkan.")
|
|
1536
|
+
),
|
|
1537
|
+
editable && has("gathering.event.confirm") ? h("div", { className: "kumpul-plan-sim-actions" }, button("gathering.event.confirm", "Konfirmasi acara")) : null
|
|
1538
|
+
);
|
|
1539
|
+
};
|
|
1540
|
+
const panels = [planPanel, invitationsPanel, confirmationPanel, paymentPanel];
|
|
1541
|
+
return h(
|
|
1542
|
+
"section",
|
|
1543
|
+
{
|
|
1544
|
+
className: "kumpul-plan-simulator kumpul-plan-live",
|
|
1545
|
+
"aria-label": "Tahapan gathering",
|
|
1546
|
+
"data-plan-live": "",
|
|
1547
|
+
"data-current-step": finished ? "DONE" : plan.workflow_step
|
|
1548
|
+
},
|
|
1549
|
+
h(
|
|
1550
|
+
"div",
|
|
1551
|
+
{ className: "kumpul-plan-simulator-heading" },
|
|
1552
|
+
h(
|
|
1553
|
+
"div",
|
|
1554
|
+
null,
|
|
1555
|
+
h("p", { className: "kumpul-eyebrow" }, "Kelola rencana"),
|
|
1556
|
+
h("h2", null, finished ? "Rencana selesai diproses" : `Tahap ${currentIndex + 1}: ${gatheringWorkflowSteps[currentIndex].label}`),
|
|
1557
|
+
h("p", null, "Klik tahap sebelumnya untuk melihat ringkasan yang sudah diisi.")
|
|
1558
|
+
)
|
|
1559
|
+
),
|
|
1560
|
+
h(
|
|
1561
|
+
"ol",
|
|
1562
|
+
{ className: "kumpul-plan-sim-steps", "aria-label": "Tahapan gathering" },
|
|
1563
|
+
...gatheringWorkflowSteps.map((step, index) => h(
|
|
1564
|
+
"li",
|
|
1565
|
+
{
|
|
1566
|
+
key: step.key,
|
|
1567
|
+
className: finished || index < currentIndex ? "is-complete" : index === currentIndex ? "is-current" : ""
|
|
1568
|
+
},
|
|
1569
|
+
h(
|
|
1570
|
+
"button",
|
|
1571
|
+
{
|
|
1572
|
+
type: "button",
|
|
1573
|
+
"data-plan-step-tab": step.key,
|
|
1574
|
+
"aria-current": index === currentIndex ? "step" : void 0,
|
|
1575
|
+
"aria-pressed": index === currentIndex ? "true" : "false",
|
|
1576
|
+
disabled: index > currentIndex
|
|
1577
|
+
},
|
|
1578
|
+
h("span", null, finished || index < currentIndex ? "\u2713" : String(index + 1)),
|
|
1579
|
+
h("span", null, step.label)
|
|
1580
|
+
)
|
|
1581
|
+
))
|
|
1582
|
+
),
|
|
1583
|
+
...gatheringWorkflowSteps.map((step, index) => {
|
|
1584
|
+
const editable = !finished && index === currentIndex;
|
|
1585
|
+
return h(
|
|
1586
|
+
"div",
|
|
1587
|
+
{
|
|
1588
|
+
key: step.key,
|
|
1589
|
+
className: "kumpul-plan-sim-panel",
|
|
1590
|
+
"data-plan-step-panel": step.key,
|
|
1591
|
+
hidden: index !== currentIndex
|
|
1592
|
+
},
|
|
1593
|
+
h("h3", null, `${index + 1}. ${step.label}`),
|
|
1594
|
+
index < currentIndex || finished ? h("p", { className: "kumpul-plan-live-readonly" }, "Ringkasan tahap yang sudah dilewati \u2014 tidak dapat diubah.") : null,
|
|
1595
|
+
panels[index](editable)
|
|
1596
|
+
);
|
|
1597
|
+
}),
|
|
1598
|
+
has("gathering.cancel") ? h(
|
|
1599
|
+
"details",
|
|
1600
|
+
{ className: "kumpul-plan-live-cancel", "data-bagdja-scope": "" },
|
|
1601
|
+
h("summary", null, "Batalkan acara"),
|
|
1602
|
+
h(
|
|
1603
|
+
"label",
|
|
1604
|
+
null,
|
|
1605
|
+
"Alasan pembatalan (opsional)",
|
|
1606
|
+
h("input", { type: "text", maxLength: 500, placeholder: "Dibatalkan oleh initiator", "data-bagdja-field": "reason" })
|
|
1607
|
+
),
|
|
1608
|
+
button("gathering.cancel", "Batalkan acara", {}, "kumpul-plan-live-danger")
|
|
1609
|
+
) : null
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
889
1612
|
function GatheringPlanDetailSection({ props, section }) {
|
|
890
1613
|
const sectionContent = section?.content || {};
|
|
891
|
-
const plan = props.
|
|
892
|
-
const order =
|
|
1614
|
+
const plan = props.kumpulPage && props.kumpulPage.plan || sectionContent.gatheringPlan || {};
|
|
1615
|
+
const order = sectionContent.order || {};
|
|
893
1616
|
const occurrence = plan.occurrence || {};
|
|
894
1617
|
const openedIds = new Set(list(occurrence.opened_option_ids_snapshot));
|
|
895
1618
|
const openedOptions = list(occurrence.option_groups_snapshot).filter((option) => openedIds.has(option.product_option_id));
|
|
@@ -933,26 +1656,7 @@ function GatheringPlanDetailSection({ props, section }) {
|
|
|
933
1656
|
"Preview desainer \xB7 data contoh saja. Status dan pengelolaan rencana dilakukan oleh host Bagdja."
|
|
934
1657
|
) : null,
|
|
935
1658
|
props.isPreview === true ? h(GatheringPlanSimulator, { plan, props }) : null,
|
|
936
|
-
props.isPreview === true ? null : h(
|
|
937
|
-
"section",
|
|
938
|
-
{ className: "kumpul-plan-workflow", "aria-label": "Tahapan gathering" },
|
|
939
|
-
h("p", { className: "kumpul-plan-current-step" }, "Tahap saat ini: ", h("strong", { "data-plan-current-step": "" }, currentStep)),
|
|
940
|
-
h(
|
|
941
|
-
"ol",
|
|
942
|
-
null,
|
|
943
|
-
...gatheringWorkflowSteps.map((step, index) => h(
|
|
944
|
-
"li",
|
|
945
|
-
{
|
|
946
|
-
key: step.key,
|
|
947
|
-
className: index < currentStepIndex ? "is-complete" : index === currentStepIndex ? "is-current" : "",
|
|
948
|
-
"aria-current": index === currentStepIndex ? "step" : void 0
|
|
949
|
-
},
|
|
950
|
-
h("span", { className: "kumpul-plan-step-marker", "aria-hidden": "true" }, index < currentStepIndex ? "\u2713" : String(index + 1)),
|
|
951
|
-
h("span", null, step.label)
|
|
952
|
-
))
|
|
953
|
-
),
|
|
954
|
-
h("p", { className: "kumpul-plan-readonly" }, "Ringkasan ini hanya untuk melihat progres. Aksi rencana tersedia melalui host Bagdja.")
|
|
955
|
-
),
|
|
1659
|
+
props.isPreview === true ? null : h(LivePlanWorkflow, { plan, props }),
|
|
956
1660
|
h(
|
|
957
1661
|
"div",
|
|
958
1662
|
{ className: "kumpul-plan-layout" },
|
|
@@ -1024,7 +1728,7 @@ function GatheringPlanDetailSection({ props, section }) {
|
|
|
1024
1728
|
h("h2", null, "Status rencana"),
|
|
1025
1729
|
h("span", { className: "kumpul-transaction-status kumpul-transaction-status-info" }, workflowStatus),
|
|
1026
1730
|
h("p", null, "Tahap kerja \xB7 ", h("span", { "data-plan-aside-step": "" }, currentStep)),
|
|
1027
|
-
h("p", null, "Rencana gathering dikelola terpisah dari keranjang. Pembayaran peserta
|
|
1731
|
+
h("p", null, "Rencana gathering dikelola terpisah dari keranjang. Pembayaran peserta dibuka setelah RSVP ditutup di tahap Konfirmasi undangan."),
|
|
1028
1732
|
order.id ? h("p", { className: "kumpul-plan-order-ref" }, `Referensi pesanan \xB7 ${order.id}`) : null,
|
|
1029
1733
|
h("a", { className: "kumpul-plan-account-link", href: tenantPath(props, "/cart") }, "Kembali ke Keranjang")
|
|
1030
1734
|
)
|
|
@@ -1032,7 +1736,7 @@ function GatheringPlanDetailSection({ props, section }) {
|
|
|
1032
1736
|
);
|
|
1033
1737
|
}
|
|
1034
1738
|
function BillingSection({ props }) {
|
|
1035
|
-
const previewInvoices = props.
|
|
1739
|
+
const previewInvoices = list(props.kumpulPage && props.kumpulPage.invoices);
|
|
1036
1740
|
const outstandingCount = previewInvoices.filter((invoice) => billingStatus(invoice) === "issued").length;
|
|
1037
1741
|
const counts = Object.fromEntries(billingFilters.map(([key]) => [
|
|
1038
1742
|
key,
|
|
@@ -1107,10 +1811,11 @@ function BillingSection({ props }) {
|
|
|
1107
1811
|
const title = text(isGathering ? invoice.gathering_title : invoice.productName, "Tagihan gathering");
|
|
1108
1812
|
const reference = isGathering ? `${text(invoice.invoice_id, "Invoice")} \xB7 ${text(invoice.attendee_name, "Peserta")}` : `${text(invoice.label, "Termin pembayaran")} \xB7 ${text(invoice.anchorStepName, text(invoice.orderId, "Pesanan"))}`;
|
|
1109
1813
|
const dueDate = invoice.payment_deadline || invoice.dueDate;
|
|
1814
|
+
const cardHref = isGathering ? invoice.detail_href : invoice.transaction_href;
|
|
1110
1815
|
return h(
|
|
1111
1816
|
"article",
|
|
1112
1817
|
{
|
|
1113
|
-
className: `kumpul-billing-card kumpul-billing-card-${status}`,
|
|
1818
|
+
className: `kumpul-billing-card kumpul-billing-card-${status}${cardHref ? " kumpul-billing-card-linked" : ""}`,
|
|
1114
1819
|
"data-billing-item": "",
|
|
1115
1820
|
"data-billing-status": status,
|
|
1116
1821
|
key: invoice.id || index
|
|
@@ -1122,7 +1827,7 @@ function BillingSection({ props }) {
|
|
|
1122
1827
|
"div",
|
|
1123
1828
|
null,
|
|
1124
1829
|
h("span", { className: "kumpul-billing-kind" }, isGathering ? "Tagihan gathering" : `Termin ${invoice.sequence || ""}`.trim()),
|
|
1125
|
-
h("h3", null, title),
|
|
1830
|
+
h("h3", null, cardHref ? h("a", { className: "kumpul-billing-card-link", href: cardHref }, title) : title),
|
|
1126
1831
|
h("p", null, reference)
|
|
1127
1832
|
),
|
|
1128
1833
|
h("span", { className: `kumpul-billing-status kumpul-billing-status-${statusInfo.tone}` }, statusInfo.label)
|
|
@@ -1136,7 +1841,12 @@ function BillingSection({ props }) {
|
|
|
1136
1841
|
h("strong", null, formatCurrency(invoice.amount)),
|
|
1137
1842
|
dueDate ? h("p", null, `Batas pembayaran \xB7 ${formatCalendarDate(dueDate)}`) : null
|
|
1138
1843
|
),
|
|
1139
|
-
status === "issued" ? h("
|
|
1844
|
+
status === "issued" && isGathering && invoice.detail_href ? h("a", { className: "kumpul-billing-action", href: invoice.detail_href }, "Lihat detail tagihan") : status === "issued" ? h("button", {
|
|
1845
|
+
type: "button",
|
|
1846
|
+
className: "kumpul-billing-action",
|
|
1847
|
+
disabled: !invoice.can_pay || !intentEnabled(props, "invoice.pay"),
|
|
1848
|
+
...intentAttributes("invoice.pay", invoice.key)
|
|
1849
|
+
}, isGathering ? "Lihat detail tagihan" : "Bayar") : null
|
|
1140
1850
|
)
|
|
1141
1851
|
);
|
|
1142
1852
|
}),
|
|
@@ -1594,8 +2304,8 @@ function calendarMonthCells(monthKey, events, selectedDate) {
|
|
|
1594
2304
|
function CalendarSection({ props, section }) {
|
|
1595
2305
|
const content = section?.content || {};
|
|
1596
2306
|
const isPreview = props.isPreview === true;
|
|
1597
|
-
const plans =
|
|
1598
|
-
const invitations =
|
|
2307
|
+
const plans = list(content.plans);
|
|
2308
|
+
const invitations = list(content.invitations);
|
|
1599
2309
|
const attentionCount = invitations.filter((invitation) => invitation.needs_action === true).length;
|
|
1600
2310
|
const events = [
|
|
1601
2311
|
...plans.filter((plan) => calendarDateKey(plan.event_date)).map((plan) => ({
|
|
@@ -1605,7 +2315,8 @@ function CalendarSection({ props, section }) {
|
|
|
1605
2315
|
title: text(plan.title, "Rencana gathering"),
|
|
1606
2316
|
statusLabel: text(plan.status_label, calendarStatusLabels[plan.status] || "Status belum tersedia"),
|
|
1607
2317
|
event_date: plan.event_date,
|
|
1608
|
-
location: text(plan.event_location)
|
|
2318
|
+
location: text(plan.event_location),
|
|
2319
|
+
href: plan.detail_href
|
|
1609
2320
|
})),
|
|
1610
2321
|
...invitations.filter((invitation) => calendarDateKey(invitation.event_date)).map((invitation) => ({
|
|
1611
2322
|
id: invitation.id || invitation.plan_number,
|
|
@@ -1614,10 +2325,11 @@ function CalendarSection({ props, section }) {
|
|
|
1614
2325
|
title: text(invitation.gathering_title, "Undangan gathering"),
|
|
1615
2326
|
statusLabel: text(invitation.action_label, "Undangan diterima"),
|
|
1616
2327
|
event_date: invitation.event_date,
|
|
1617
|
-
location: text(invitation.event_location)
|
|
2328
|
+
location: text(invitation.event_location),
|
|
2329
|
+
href: invitation.detail_href
|
|
1618
2330
|
}))
|
|
1619
2331
|
].sort((left, right) => new Date(left.event_date).getTime() - new Date(right.event_date).getTime());
|
|
1620
|
-
const initialMonth = calendarMonthKey(content.
|
|
2332
|
+
const initialMonth = calendarMonthKey(content.month, events[0]?.event_date);
|
|
1621
2333
|
const initialDate = events.find((event) => calendarDateKey(event.event_date).startsWith(`${initialMonth}-`));
|
|
1622
2334
|
const selectedDate = initialDate ? calendarDateKey(initialDate.event_date) : `${initialMonth}-01`;
|
|
1623
2335
|
const monthLabel = formatCalendarDate(`${initialMonth}-01`, { month: "long", year: "numeric" });
|
|
@@ -1766,7 +2478,7 @@ function CalendarSection({ props, section }) {
|
|
|
1766
2478
|
...events.map((event, index) => h(
|
|
1767
2479
|
"article",
|
|
1768
2480
|
{
|
|
1769
|
-
className: `kumpul-calendar-event kumpul-calendar-event-${event.type}`,
|
|
2481
|
+
className: `kumpul-calendar-event kumpul-calendar-event-${event.type}${event.href ? " kumpul-calendar-event-linked" : ""}`,
|
|
1770
2482
|
"data-calendar-event": "",
|
|
1771
2483
|
"data-calendar-date": calendarDateKey(event.event_date),
|
|
1772
2484
|
hidden: calendarDateKey(event.event_date) !== selectedDate,
|
|
@@ -1777,7 +2489,7 @@ function CalendarSection({ props, section }) {
|
|
|
1777
2489
|
"div",
|
|
1778
2490
|
{ className: "kumpul-calendar-event-copy" },
|
|
1779
2491
|
h("span", { className: "kumpul-calendar-event-kind" }, event.typeLabel),
|
|
1780
|
-
h("h4", null, event.title),
|
|
2492
|
+
h("h4", null, event.href ? h("a", { className: "kumpul-calendar-event-link", href: event.href }, event.title) : event.title),
|
|
1781
2493
|
h("p", null, `${event.statusLabel}${event.location ? ` \xB7 ${event.location}` : ""}`)
|
|
1782
2494
|
)
|
|
1783
2495
|
)),
|
|
@@ -1841,7 +2553,7 @@ function CalendarSection({ props, section }) {
|
|
|
1841
2553
|
),
|
|
1842
2554
|
plan.payment_deadline ? h("p", { className: "kumpul-calendar-meta" }, `Batas pembayaran: ${formatCalendarDate(plan.payment_deadline)}`) : null
|
|
1843
2555
|
),
|
|
1844
|
-
h("button", { type: "button", className: "kumpul-calendar-action", disabled: true }, "Lanjutkan rencana")
|
|
2556
|
+
plan.detail_href ? h("a", { className: "kumpul-calendar-action", href: plan.detail_href }, "Lanjutkan rencana") : h("button", { type: "button", className: "kumpul-calendar-action", disabled: true }, "Lanjutkan rencana")
|
|
1845
2557
|
)),
|
|
1846
2558
|
h("p", {
|
|
1847
2559
|
className: "kumpul-calendar-empty",
|
|
@@ -1893,7 +2605,12 @@ function CalendarSection({ props, section }) {
|
|
|
1893
2605
|
"div",
|
|
1894
2606
|
{ className: "kumpul-calendar-invitation-action" },
|
|
1895
2607
|
invitation.action_label ? h("span", null, invitation.action_label) : null,
|
|
1896
|
-
h("
|
|
2608
|
+
invitation.detail_href ? h("a", { className: "kumpul-calendar-action", href: invitation.detail_href }, "Lihat undangan") : h("button", {
|
|
2609
|
+
type: "button",
|
|
2610
|
+
className: "kumpul-calendar-action",
|
|
2611
|
+
disabled: !invitation.key || !intentEnabled(props, "gathering.respond"),
|
|
2612
|
+
...invitation.key ? intentAttributes("gathering.respond", invitation.key) : {}
|
|
2613
|
+
}, "Lihat undangan")
|
|
1897
2614
|
)
|
|
1898
2615
|
)),
|
|
1899
2616
|
h("p", {
|
|
@@ -2201,12 +2918,12 @@ function styles(colors) {
|
|
|
2201
2918
|
.kumpul-cart.is-empty .kumpul-cart-select-all,.kumpul-cart.is-empty .kumpul-cart-summary{display:none}.kumpul-cart.is-empty .kumpul-cart-layout{grid-template-columns:1fr}
|
|
2202
2919
|
@media(max-width:760px){.kumpul-cart-layout{grid-template-columns:1fr;gap:15px}.kumpul-cart-item{grid-template-columns:20px 52px minmax(0,1fr);gap:10px;padding:12px}.kumpul-cart-art{width:52px;height:52px;border-radius:12px;font-size:23px}.kumpul-cart-copy h2{font-size:11px}.kumpul-cart-item-controls{grid-column:3;min-width:0;width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}.kumpul-cart-price{margin-right:auto;font-size:12px}.kumpul-cart-summary{position:static}.kumpul-cart-heading h1{font-size:32px}}
|
|
2203
2920
|
.kumpul-transactions{max-width:980px;margin:0 auto}.kumpul-transactions-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.kumpul-transactions-heading h1{margin:0;color:var(--kt-text);font-size:clamp(30px,4vw,42px);line-height:1.15;letter-spacing:-.04em}.kumpul-transactions-heading>div:first-child>p:last-child{margin:9px 0 0;color:var(--kt-muted);font-size:13px}.kumpul-transactions-total{padding:13px 16px;display:grid;gap:2px;border:1px solid var(--kt-border);border-radius:15px;background:var(--kt-surface)}.kumpul-transactions-total strong{font-size:21px;line-height:1.1}.kumpul-transactions-total span{color:var(--kt-muted);font-size:10px}.kumpul-transactions-preview-note{margin:20px 0 0;padding:11px 14px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-surface);color:var(--kt-muted);font-size:11px}.kumpul-transactions-filters{margin:25px 0 22px;padding-bottom:7px;display:flex;gap:8px;overflow-x:auto;border-bottom:1px solid var(--kt-border);scrollbar-width:thin}.kumpul-transactions-filters button{padding:9px 12px;display:inline-flex;align-items:center;gap:8px;border:1px solid transparent;border-radius:11px 11px 0 0;background:transparent;color:var(--kt-muted);font:inherit;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}.kumpul-transactions-filters button[aria-pressed=true]{border-color:var(--kt-border);border-bottom-color:var(--kt-surface);background:var(--kt-surface);color:var(--kt-accent)}.kumpul-transactions-filters button span{min-width:20px;height:20px;padding:2px 6px;display:grid;place-items:center;border-radius:99px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px}.kumpul-transactions-list{display:grid;gap:12px}.kumpul-transaction-card{overflow:hidden;border:1px solid var(--kt-border);border-radius:16px;background:var(--kt-surface)}.kumpul-transaction-top{padding:13px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e8f0f2}.kumpul-transaction-top>div{display:flex;align-items:center;gap:8px;color:var(--kt-muted);font-size:10px}.kumpul-transaction-ref{color:var(--kt-text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:750}.kumpul-transaction-status{padding:6px 9px;flex:none;border-radius:99px;font-size:9px;font-weight:800}.kumpul-transaction-status-warning{background:#fff4da;color:#a15c00}.kumpul-transaction-status-info{background:#e8f2ff;color:#2563eb}.kumpul-transaction-status-success{background:#e5f7ef;color:#08734f}.kumpul-transaction-status-danger{background:#ffeded;color:#b91c1c}.kumpul-transaction-status-muted{background:#eef1f4;color:#64748b}.kumpul-transaction-body{padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:20px}.kumpul-transaction-item{min-width:0;display:flex;align-items:center;gap:13px}.kumpul-transaction-art{width:58px;height:58px;flex:none;display:grid;place-items:center;border:1px solid var(--kt-border);border-radius:14px;background:var(--kt-bg);color:var(--kt-accent);font-size:26px}.kumpul-transaction-item>div{min-width:0}.kumpul-transaction-item h2{margin:0;font-size:13px}.kumpul-transaction-item p{margin:5px 0 0;color:var(--kt-muted);font-size:10px}.kumpul-transaction-total{flex:none;text-align:right}.kumpul-transaction-total span{display:block;color:var(--kt-muted);font-size:10px}.kumpul-transaction-total strong{display:block;margin-top:3px;font-size:16px}.kumpul-transaction-actions{padding:0 18px 15px;display:flex;justify-content:flex-end;gap:8px}.kumpul-transaction-actions button{min-height:34px;padding:7px 11px;border:1px solid var(--kt-border);border-radius:10px;background:var(--kt-surface);color:var(--kt-text);font:inherit;font-size:9px;font-weight:750;opacity:.62;cursor:not-allowed}.kumpul-transaction-actions button:disabled{opacity:.62}.kumpul-transactions-empty{margin:0;padding:32px 18px;border:1px dashed var(--kt-border);border-radius:15px;color:var(--kt-muted);font-size:12px;text-align:center}
|
|
2204
|
-
@media(max-width:700px){.kumpul-transactions-heading{align-items:flex-start;flex-direction:column;gap:16px}.kumpul-transactions-total{width:100%;padding:11px 13px}.kumpul-transactions-total strong{font-size:18px}.kumpul-transactions-filters{margin-top:20px}.kumpul-transaction-top{align-items:flex-start;padding:12px 14px}.kumpul-transaction-top>div{flex-wrap:wrap;gap:5px;font-size:9px}.kumpul-transaction-status{max-width:120px;white-space:normal;text-align:center}.kumpul-transaction-body{align-items:flex-start;padding:14px;gap:10px}.kumpul-transaction-art{width:44px;height:44px;border-radius:12px;font-size:20px}.kumpul-transaction-item{gap:9px}.kumpul-transaction-item h2{font-size:11px}.kumpul-transaction-total strong{font-size:13px}.kumpul-transaction-actions{padding:0 14px 13px;flex-wrap:wrap}.kumpul-transaction-actions button{flex:1;padding:7px 8px;font-size:8px}}
|
|
2205
|
-
.kumpul-billing{max-width:980px;margin:0 auto}.kumpul-billing-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.kumpul-billing-heading h1{margin:0;color:var(--kt-text);font-size:clamp(30px,4vw,42px);line-height:1.15;letter-spacing:-.04em}.kumpul-billing-description{margin:9px 0 0;color:var(--kt-muted);font-size:13px}.kumpul-billing-summary{display:flex;gap:10px}.kumpul-billing-summary-card{min-width:132px;padding:13px 16px;display:grid;gap:2px;border:1px solid var(--kt-border);border-radius:15px;background:var(--kt-surface)}.kumpul-billing-summary-card strong{font-size:21px;line-height:1.1}.kumpul-billing-summary-card span{color:var(--kt-muted);font-size:10px}.kumpul-billing-preview-note{margin:20px 0 0;padding:11px 14px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-surface);color:var(--kt-muted);font-size:11px}.kumpul-billing-filters{margin:25px 0 22px;padding-bottom:7px;display:flex;gap:8px;overflow-x:auto;border-bottom:1px solid var(--kt-border);scrollbar-width:thin}.kumpul-billing-filters button{padding:9px 12px;display:inline-flex;align-items:center;gap:8px;border:1px solid transparent;border-radius:11px 11px 0 0;background:transparent;color:var(--kt-muted);font:inherit;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}.kumpul-billing-filters button[aria-pressed=true]{border-color:var(--kt-border);border-bottom-color:var(--kt-surface);background:var(--kt-surface);color:var(--kt-accent)}.kumpul-billing-filters button span{min-width:20px;height:20px;padding:2px 6px;display:grid;place-items:center;border-radius:99px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px}.kumpul-billing-results-heading{margin-bottom:12px;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.kumpul-billing-results-heading h2{margin:0;font-size:16px}.kumpul-billing-results-heading span{color:var(--kt-muted);font-size:11px}.kumpul-billing-list{display:grid;gap:12px}.kumpul-billing-card{overflow:hidden;border:1px solid var(--kt-border);border-radius:16px;background:var(--kt-surface)}.kumpul-billing-card-top{padding:17px 19px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid #e8f0f2}.kumpul-billing-kind{color:var(--kt-accent);font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.kumpul-billing-card h3{margin:4px 0 0;font-size:14px}.kumpul-billing-card-top p{margin:5px 0 0;color:var(--kt-muted);font-size:10px}.kumpul-billing-status{padding:6px 9px;flex:none;border-radius:99px;font-size:9px;font-weight:800}.kumpul-billing-status-warning{background:#fff4da;color:#a15c00}.kumpul-billing-status-success{background:#e5f7ef;color:#08734f}.kumpul-billing-status-muted{background:#eef1f4;color:#64748b}.kumpul-billing-card-bottom{padding:14px 19px;display:flex;align-items:center;justify-content:space-between;gap:16px}.kumpul-billing-card-bottom strong{font-size:17px;color:var(--kt-accent)}.kumpul-billing-card-bottom p{margin:4px 0 0;color:var(--kt-muted);font-size:10px}.kumpul-billing-action{min-height:36px;padding:8px 13px;border:0;border-radius:10px;background:var(--kt-accent);color:#fff;font:inherit;font-size:10px;font-weight:750;opacity:.62;cursor:not-allowed}.kumpul-billing-empty{margin:0;padding:32px 18px;border:1px dashed var(--kt-border);border-radius:15px;color:var(--kt-muted);font-size:12px;text-align:center}
|
|
2921
|
+
@media(max-width:700px){.kumpul-transactions-heading{align-items:flex-start;flex-direction:column;gap:16px}.kumpul-transactions-total{width:100%;padding:11px 13px}.kumpul-transactions-total strong{font-size:18px}.kumpul-transactions-filters{margin-top:20px}.kumpul-transaction-top{align-items:flex-start;padding:12px 14px}.kumpul-transaction-top>div{flex-wrap:wrap;gap:5px;font-size:9px}.kumpul-transaction-status{max-width:120px;white-space:normal;text-align:center}.kumpul-transaction-body{align-items:flex-start;padding:14px;gap:10px}.kumpul-transaction-art{width:44px;height:44px;border-radius:12px;font-size:20px}.kumpul-transaction-item{gap:9px}.kumpul-transaction-item h2{font-size:11px}.kumpul-transaction-total strong{font-size:13px}.kumpul-transaction-actions{padding:0 14px 13px;flex-wrap:wrap}.kumpul-transaction-actions button,.kumpul-transaction-actions .kumpul-transaction-action-link{flex:1;padding:7px 8px;font-size:8px}}
|
|
2922
|
+
.kumpul-billing{max-width:980px;margin:0 auto}.kumpul-billing-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.kumpul-billing-heading h1{margin:0;color:var(--kt-text);font-size:clamp(30px,4vw,42px);line-height:1.15;letter-spacing:-.04em}.kumpul-billing-description{margin:9px 0 0;color:var(--kt-muted);font-size:13px}.kumpul-billing-summary{display:flex;gap:10px}.kumpul-billing-summary-card{min-width:132px;padding:13px 16px;display:grid;gap:2px;border:1px solid var(--kt-border);border-radius:15px;background:var(--kt-surface)}.kumpul-billing-summary-card strong{font-size:21px;line-height:1.1}.kumpul-billing-summary-card span{color:var(--kt-muted);font-size:10px}.kumpul-billing-preview-note{margin:20px 0 0;padding:11px 14px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-surface);color:var(--kt-muted);font-size:11px}.kumpul-billing-filters{margin:25px 0 22px;padding-bottom:7px;display:flex;gap:8px;overflow-x:auto;border-bottom:1px solid var(--kt-border);scrollbar-width:thin}.kumpul-billing-filters button{padding:9px 12px;display:inline-flex;align-items:center;gap:8px;border:1px solid transparent;border-radius:11px 11px 0 0;background:transparent;color:var(--kt-muted);font:inherit;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}.kumpul-billing-filters button[aria-pressed=true]{border-color:var(--kt-border);border-bottom-color:var(--kt-surface);background:var(--kt-surface);color:var(--kt-accent)}.kumpul-billing-filters button span{min-width:20px;height:20px;padding:2px 6px;display:grid;place-items:center;border-radius:99px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px}.kumpul-billing-results-heading{margin-bottom:12px;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.kumpul-billing-results-heading h2{margin:0;font-size:16px}.kumpul-billing-results-heading span{color:var(--kt-muted);font-size:11px}.kumpul-billing-list{display:grid;gap:12px}.kumpul-billing-card{overflow:hidden;border:1px solid var(--kt-border);border-radius:16px;background:var(--kt-surface)}.kumpul-billing-card-top{padding:17px 19px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid #e8f0f2}.kumpul-billing-kind{color:var(--kt-accent);font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.kumpul-billing-card h3{margin:4px 0 0;font-size:14px}.kumpul-billing-card-linked{position:relative;transition:border-color .15s,box-shadow .15s}.kumpul-billing-card-linked:hover{border-color:var(--kt-accent);box-shadow:0 8px 22px rgba(15,23,42,.06)}.kumpul-billing-card-linked:focus-within{border-color:var(--kt-accent)}.kumpul-billing-card-link{color:inherit;text-decoration:none;outline:none}.kumpul-billing-card-link::after{content:'';position:absolute;inset:0;z-index:0;border-radius:inherit}.kumpul-billing-card-linked .kumpul-billing-status,.kumpul-billing-card-linked .kumpul-billing-action{position:relative;z-index:1}.kumpul-billing-card-top p{margin:5px 0 0;color:var(--kt-muted);font-size:10px}.kumpul-billing-status{padding:6px 9px;flex:none;border-radius:99px;font-size:9px;font-weight:800}.kumpul-billing-status-warning{background:#fff4da;color:#a15c00}.kumpul-billing-status-success{background:#e5f7ef;color:#08734f}.kumpul-billing-status-muted{background:#eef1f4;color:#64748b}.kumpul-billing-card-bottom{padding:14px 19px;display:flex;align-items:center;justify-content:space-between;gap:16px}.kumpul-billing-card-bottom strong{font-size:17px;color:var(--kt-accent)}.kumpul-billing-card-bottom p{margin:4px 0 0;color:var(--kt-muted);font-size:10px}.kumpul-billing-action{min-height:36px;padding:8px 13px;border:0;border-radius:10px;background:var(--kt-accent);color:#fff;font:inherit;font-size:10px;font-weight:750;opacity:.62;cursor:not-allowed}.kumpul-billing-empty{margin:0;padding:32px 18px;border:1px dashed var(--kt-border);border-radius:15px;color:var(--kt-muted);font-size:12px;text-align:center}
|
|
2206
2923
|
@media(max-width:700px){.kumpul-billing-heading{align-items:flex-start;flex-direction:column;gap:16px}.kumpul-billing-summary{width:100%}.kumpul-billing-summary-card{min-width:0;flex:1;padding:11px 13px}.kumpul-billing-summary-card strong{font-size:18px}.kumpul-billing-filters{margin-top:20px}.kumpul-billing-card-top{padding:15px;gap:10px}.kumpul-billing-card h3{font-size:13px}.kumpul-billing-status{max-width:120px;white-space:normal;text-align:center}.kumpul-billing-card-bottom{padding:13px 15px}.kumpul-billing-card-bottom strong{font-size:15px}}
|
|
2207
2924
|
.kumpul-calendar-agenda:not([open]){display:none}.kumpul-calendar-agenda[open]{position:fixed;inset:50% auto auto 50%;z-index:10;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 48px);margin:0;padding:0;display:flex;flex-direction:column;transform:translate(-50%,-50%);overflow:hidden;border:1px solid var(--kt-border);border-radius:22px;background:var(--kt-bg);color:var(--kt-text);box-shadow:0 24px 80px #0f172a45}.kumpul-calendar-agenda::backdrop{background:rgb(15 23 42 / 45%);backdrop-filter:blur(2px)}.kumpul-calendar-agenda-handle{display:none}.kumpul-calendar-agenda-heading{padding:22px 24px 16px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--kt-border)}.kumpul-calendar-agenda-heading .kumpul-eyebrow{margin:0 0 4px}.kumpul-calendar-agenda-heading h2{margin:0;font-size:20px;text-transform:capitalize}.kumpul-calendar-agenda-close{width:36px;height:36px;flex:none;border:1px solid var(--kt-border);border-radius:50%;background:var(--kt-surface);color:var(--kt-text);font:inherit;font-size:22px;line-height:1;cursor:pointer}.kumpul-calendar-agenda-content{min-height:0;padding:18px 24px 24px;overflow:auto;overscroll-behavior:contain}.kumpul-calendar-agenda-list{display:grid;gap:10px}.kumpul-calendar-empty{margin:0;padding:18px;border:1px dashed var(--kt-border);border-radius:14px;color:var(--kt-muted);font-size:13px;text-align:center}
|
|
2208
2925
|
@media(max-width:620px){.kumpul-calendar-agenda[open]{inset:auto 0 0;width:100%;max-width:none;max-height:min(84dvh,720px);padding-bottom:env(safe-area-inset-bottom);transform:none;border-right:0;border-bottom:0;border-left:0;border-radius:22px 22px 0 0}.kumpul-calendar-agenda-handle{width:38px;height:4px;margin:10px auto 0;display:block;border-radius:99px;background:#cbd5e1}.kumpul-calendar-agenda-heading{padding:14px 20px 14px}.kumpul-calendar-agenda-content{padding:16px 20px 22px}.kumpul-calendar-agenda-close{width:34px;height:34px}}
|
|
2209
|
-
.kumpul-calendar-month-toolbar{margin:22px 0 14px;padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--kt-border);border-radius:17px;background:var(--kt-surface)}.kumpul-calendar-month-title h2{margin:0;font-size:20px;line-height:1.2;text-transform:capitalize}.kumpul-calendar-month-title p{margin:5px 0 0;color:var(--kt-muted);font-size:11px}.kumpul-calendar-month-actions{display:flex;align-items:center;gap:7px}.kumpul-calendar-month-actions button{min-width:38px;height:38px;padding:7px 11px;border:1px solid var(--kt-border);border-radius:11px;background:var(--kt-surface);color:var(--kt-text);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.kumpul-calendar-month-actions button[data-calendar-previous],.kumpul-calendar-month-actions button[data-calendar-next]{font-size:22px;line-height:1}.kumpul-calendar-month-view{overflow:hidden;border:1px solid var(--kt-border);border-radius:17px;background:var(--kt-surface)}.kumpul-calendar-weekdays,.kumpul-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.kumpul-calendar-weekdays{border-bottom:1px solid var(--kt-border);background:#f8fbfc}.kumpul-calendar-weekdays span{padding:10px 6px;color:var(--kt-muted);font-size:10px;font-weight:750;text-align:center}.kumpul-calendar-day{position:relative;min-width:0;min-height:77px;padding:9px;display:flex;align-items:flex-start;justify-content:space-between;gap:4px;border:0;border-right:1px solid #e8f0f2;border-bottom:1px solid #e8f0f2;background:var(--kt-surface);color:var(--kt-text);font:inherit;text-align:left;cursor:pointer}.kumpul-calendar-day:nth-child(7n){border-right:0}.kumpul-calendar-day:nth-last-child(-n+7){border-bottom:0}.kumpul-calendar-day:hover{background:#f4fafb}.kumpul-calendar-day[aria-pressed=true]{background:#e6f4f6;box-shadow:inset 0 0 0 2px var(--kt-accent)}.kumpul-calendar-day[data-outside-month=true]{color:#a7b3bd;background:#fbfcfd}.kumpul-calendar-day>span{font-size:11px;font-weight:700}.kumpul-calendar-day small{min-width:19px;height:19px;padding:2px 5px;display:grid;place-items:center;border-radius:999px;background:var(--kt-accent);color:#fff;font-size:9px;font-weight:800}.kumpul-calendar-day:focus-visible,.kumpul-calendar-month-actions button:focus-visible{position:relative;z-index:1;outline:3px solid var(--kt-success);outline-offset:-3px}.kumpul-calendar-agenda{margin-top:24px}.kumpul-calendar-agenda>h3{margin:0 0 12px;font-size:16px;text-transform:capitalize}.kumpul-calendar-event{padding:14px 16px;display:grid;grid-template-columns:76px 1fr;align-items:start;gap:14px;border:1px solid var(--kt-border);border-left:4px solid var(--kt-accent);border-radius:14px;background:var(--kt-surface)}.kumpul-calendar-event[hidden]{display:none}.kumpul-calendar-event-invitation{border-left-color:var(--kt-success)}.kumpul-calendar-event-time{padding-top:2px;color:var(--kt-accent);font-size:11px;font-weight:800}.kumpul-calendar-event-copy{min-width:0}.kumpul-calendar-event-kind{color:var(--kt-muted);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.kumpul-calendar-event-copy h4{margin:3px 0 0;font-size:13px}.kumpul-calendar-event-copy p{margin:4px 0 0;color:var(--kt-muted);font-size:10px}
|
|
2926
|
+
.kumpul-calendar-month-toolbar{margin:22px 0 14px;padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--kt-border);border-radius:17px;background:var(--kt-surface)}.kumpul-calendar-month-title h2{margin:0;font-size:20px;line-height:1.2;text-transform:capitalize}.kumpul-calendar-month-title p{margin:5px 0 0;color:var(--kt-muted);font-size:11px}.kumpul-calendar-month-actions{display:flex;align-items:center;gap:7px}.kumpul-calendar-month-actions button{min-width:38px;height:38px;padding:7px 11px;border:1px solid var(--kt-border);border-radius:11px;background:var(--kt-surface);color:var(--kt-text);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.kumpul-calendar-month-actions button[data-calendar-previous],.kumpul-calendar-month-actions button[data-calendar-next]{font-size:22px;line-height:1}.kumpul-calendar-month-view{overflow:hidden;border:1px solid var(--kt-border);border-radius:17px;background:var(--kt-surface)}.kumpul-calendar-weekdays,.kumpul-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.kumpul-calendar-weekdays{border-bottom:1px solid var(--kt-border);background:#f8fbfc}.kumpul-calendar-weekdays span{padding:10px 6px;color:var(--kt-muted);font-size:10px;font-weight:750;text-align:center}.kumpul-calendar-day{position:relative;min-width:0;min-height:77px;padding:9px;display:flex;align-items:flex-start;justify-content:space-between;gap:4px;border:0;border-right:1px solid #e8f0f2;border-bottom:1px solid #e8f0f2;background:var(--kt-surface);color:var(--kt-text);font:inherit;text-align:left;cursor:pointer}.kumpul-calendar-day:nth-child(7n){border-right:0}.kumpul-calendar-day:nth-last-child(-n+7){border-bottom:0}.kumpul-calendar-day:hover{background:#f4fafb}.kumpul-calendar-day[aria-pressed=true]{background:#e6f4f6;box-shadow:inset 0 0 0 2px var(--kt-accent)}.kumpul-calendar-day[data-outside-month=true]{color:#a7b3bd;background:#fbfcfd}.kumpul-calendar-day>span{font-size:11px;font-weight:700}.kumpul-calendar-day small{min-width:19px;height:19px;padding:2px 5px;display:grid;place-items:center;border-radius:999px;background:var(--kt-accent);color:#fff;font-size:9px;font-weight:800}.kumpul-calendar-day:focus-visible,.kumpul-calendar-month-actions button:focus-visible{position:relative;z-index:1;outline:3px solid var(--kt-success);outline-offset:-3px}.kumpul-calendar-agenda{margin-top:24px}.kumpul-calendar-agenda>h3{margin:0 0 12px;font-size:16px;text-transform:capitalize}.kumpul-calendar-event{padding:14px 16px;display:grid;grid-template-columns:76px 1fr;align-items:start;gap:14px;border:1px solid var(--kt-border);border-left:4px solid var(--kt-accent);border-radius:14px;background:var(--kt-surface)}.kumpul-calendar-event[hidden]{display:none}.kumpul-calendar-event-linked{position:relative;transition:border-color .15s,box-shadow .15s}.kumpul-calendar-event-linked:hover,.kumpul-calendar-event-linked:focus-within{border-color:var(--kt-accent);box-shadow:0 8px 22px rgba(15,23,42,.06)}.kumpul-calendar-event-link{color:inherit;text-decoration:none;outline:none}.kumpul-calendar-event-link::after{content:'';position:absolute;inset:0;border-radius:inherit}.kumpul-calendar-event-invitation{border-left-color:var(--kt-success)}.kumpul-calendar-event-time{padding-top:2px;color:var(--kt-accent);font-size:11px;font-weight:800}.kumpul-calendar-event-copy{min-width:0}.kumpul-calendar-event-kind{color:var(--kt-muted);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.kumpul-calendar-event-copy h4{margin:3px 0 0;font-size:13px}.kumpul-calendar-event-copy p{margin:4px 0 0;color:var(--kt-muted);font-size:10px}
|
|
2210
2927
|
@media(max-width:620px){.kumpul-calendar-month-toolbar{padding:13px;align-items:flex-start}.kumpul-calendar-month-title h2{font-size:17px}.kumpul-calendar-month-title p{max-width:170px;font-size:9px}.kumpul-calendar-month-actions{gap:4px}.kumpul-calendar-month-actions button{min-width:33px;height:34px;padding:5px 8px;font-size:10px}.kumpul-calendar-weekdays span{padding:8px 2px;font-size:9px}.kumpul-calendar-day{min-height:55px;padding:6px 5px}.kumpul-calendar-day>span{font-size:10px}.kumpul-calendar-day small{min-width:16px;height:16px;padding:1px 4px;font-size:8px}.kumpul-calendar-event{grid-template-columns:52px 1fr;gap:9px;padding:12px}.kumpul-calendar-event-time{font-size:10px}}
|
|
2211
2928
|
@media(max-width:620px){.kumpul-calendar-tabs{overflow-x:auto}.kumpul-calendar-tabs button{flex:none;white-space:nowrap}}
|
|
2212
2929
|
.kumpul-template{--kt-bg:${colors.background};--kt-surface:${colors.surface};--kt-text:${colors.text};--kt-muted:${colors.textMuted};--kt-accent:${colors.accent};--kt-hover:${colors.accentHover};--kt-border:${colors.border};--kt-success:${colors.success};--kt-warning:${colors.warning};min-height:100vh;background:var(--kt-bg);color:var(--kt-text);font:400 15px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
|
|
@@ -2244,19 +2961,37 @@ function styles(colors) {
|
|
|
2244
2961
|
.kumpul-footer{padding:26px 28px;display:flex;justify-content:space-between;gap:14px;border-top:1px solid var(--kt-border);color:var(--kt-muted);font-size:11px}.kumpul-footer strong{color:var(--kt-text)}.kumpul-mobile-dock{display:none}
|
|
2245
2962
|
.kumpul-detail-page{max-width:980px;margin:0 auto}.kumpul-detail-back{display:inline-block;margin-bottom:20px;color:var(--kt-accent);font-size:11px;font-weight:750}.kumpul-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.kumpul-detail-heading h1{margin:0;color:var(--kt-text);font-size:clamp(28px,4vw,40px);line-height:1.15;letter-spacing:-.04em}.kumpul-detail-heading .kumpul-eyebrow{margin-bottom:8px}.kumpul-detail-heading>div>p:last-child{margin:8px 0 0;color:var(--kt-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.kumpul-detail-preview-note{margin:18px 0 0;padding:11px 14px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-surface);color:var(--kt-muted);font-size:10px}.kumpul-detail-layout{margin-top:22px;display:grid;grid-template-columns:minmax(0,1fr) 310px;align-items:start;gap:18px}.kumpul-detail-main{display:grid;gap:14px}.kumpul-detail-card{min-width:0;padding:20px;border:1px solid var(--kt-border);border-radius:17px;background:var(--kt-surface)}.kumpul-detail-card h2{margin:0 0 16px;font-size:14px}.kumpul-detail-fields{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.kumpul-detail-fields>div{min-width:0}.kumpul-detail-fields dt,.kumpul-detail-totals dt{color:var(--kt-muted);font-size:9px}.kumpul-detail-fields dd,.kumpul-detail-totals dd{margin:4px 0 0;font-size:11px;font-weight:700;overflow-wrap:anywhere}.kumpul-detail-total{margin-top:20px;padding-top:16px;display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-top:1px solid var(--kt-border);color:var(--kt-muted);font-size:11px}.kumpul-detail-total strong{color:var(--kt-accent);font-size:22px}.kumpul-detail-aside{position:sticky;top:20px}.kumpul-detail-aside>p{margin:13px 0 0;color:var(--kt-muted);font-size:10px;line-height:1.6}.kumpul-detail-aside>button{width:100%;min-height:42px;margin-top:16px;padding:10px;border:0;border-radius:11px;background:var(--kt-accent);color:#fff;font:inherit;font-size:11px;font-weight:800;opacity:.55;cursor:not-allowed}.kumpul-detail-login-info{margin-top:15px;padding:13px;border-left:3px solid var(--kt-accent);background:var(--kt-bg)}.kumpul-detail-login-info h3{margin:0;font-size:11px}.kumpul-detail-login-info p{margin:7px 0 0;color:var(--kt-muted);font-size:10px;line-height:1.6}.kumpul-detail-items{display:grid}.kumpul-detail-item{padding:13px 0;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;border-top:1px solid var(--kt-border)}.kumpul-detail-item-art{width:48px;height:48px;display:grid;place-items:center;border:1px solid var(--kt-border);border-radius:13px;background:var(--kt-bg);color:var(--kt-accent);font-size:20px;font-weight:800}.kumpul-detail-item-copy{min-width:0}.kumpul-detail-item h3{margin:0;font-size:11px}.kumpul-detail-item p{margin:5px 0 0;color:var(--kt-muted);font-size:9px}.kumpul-detail-item>strong{font-size:10px;white-space:nowrap}.kumpul-detail-escrow-note{display:block;margin-top:5px;color:var(--kt-accent);font-size:8px;line-height:1.5}.kumpul-detail-address{margin:0;color:var(--kt-muted);font-size:11px;line-height:1.6}.kumpul-detail-totals{margin:0;display:grid;gap:12px}.kumpul-detail-totals>div{display:flex;justify-content:space-between;gap:12px}.kumpul-detail-totals dd{margin:0;text-align:right}.kumpul-detail-grand-total{padding-top:13px;border-top:1px solid var(--kt-border)}.kumpul-detail-grand-total dt{color:var(--kt-text);font-weight:800}.kumpul-detail-grand-total dd{color:var(--kt-accent);font-size:16px}.kumpul-detail-payment-fields{margin-top:17px;padding-top:14px;border-top:1px solid var(--kt-border)}.kumpul-detail-fields .kumpul-detail-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px}.kumpul-detail-payment-note{padding:10px 12px;border:1px solid var(--kt-border);border-radius:11px;background:var(--kt-bg)}
|
|
2246
2963
|
.kumpul-plan-detail{max-width:980px;margin:0 auto}.kumpul-plan-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.kumpul-plan-heading h1{margin:0;color:var(--kt-text);font-size:clamp(28px,4vw,40px);line-height:1.15;letter-spacing:-.04em}.kumpul-plan-heading .kumpul-eyebrow{margin-bottom:8px}.kumpul-plan-number{margin:9px 0 0;color:var(--kt-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px}.kumpul-plan-workflow{margin-top:20px;padding:17px;border:1px solid var(--kt-border);border-radius:16px;background:var(--kt-surface)}.kumpul-plan-current-step{margin:0 0 14px;color:var(--kt-muted);font-size:10px}.kumpul-plan-current-step strong{color:var(--kt-text)}.kumpul-plan-workflow ol{margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none}.kumpul-plan-workflow li{min-width:0;padding:12px 9px 0;display:flex;align-items:center;gap:7px;border-top:2px solid var(--kt-border);color:var(--kt-muted);font-size:9px;font-weight:700}.kumpul-plan-workflow li.is-complete,.kumpul-plan-workflow li.is-current{border-color:var(--kt-accent);color:var(--kt-text)}.kumpul-plan-step-marker{width:21px;height:21px;flex:none;display:grid;place-items:center;border:1px solid var(--kt-border);border-radius:50%;font-size:9px}.kumpul-plan-workflow li.is-complete .kumpul-plan-step-marker,.kumpul-plan-workflow li.is-current .kumpul-plan-step-marker{border-color:var(--kt-accent);background:var(--kt-accent);color:#fff}.kumpul-plan-readonly{margin:12px 0 0;color:var(--kt-muted);font-size:9px;line-height:1.5}.kumpul-plan-layout{margin-top:16px;display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:start;gap:16px}.kumpul-plan-main{display:grid;gap:14px}.kumpul-plan-options{margin:0;padding:0;display:grid;list-style:none}.kumpul-plan-options li{padding:13px 0;border-top:1px solid var(--kt-border)}.kumpul-plan-option-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.kumpul-plan-option-group{color:var(--kt-muted);font-size:8px;font-weight:750;letter-spacing:.08em;text-transform:uppercase}.kumpul-plan-option-heading h3{margin:3px 0 0;font-size:11px}.kumpul-plan-options li>p{margin:6px 0 0;color:var(--kt-muted);font-size:9px;line-height:1.5}.kumpul-plan-final-option{padding:5px 8px;border:1px solid var(--kt-accent);border-radius:99px;color:var(--kt-accent);font-size:8px;font-weight:800;white-space:nowrap}.kumpul-plan-votes{display:inline-block;margin-top:8px;color:var(--kt-accent);font-size:9px;font-weight:750}.kumpul-plan-empty-options{margin:0;color:var(--kt-muted);font-size:10px}.kumpul-plan-aside>p{margin:13px 0 0;color:var(--kt-muted);font-size:10px;line-height:1.6}.kumpul-plan-order-ref{overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:8px!important}.kumpul-plan-account-link{margin-top:16px;padding:10px 12px;display:block;border:1px solid var(--kt-border);border-radius:10px;color:var(--kt-accent);font-size:10px;font-weight:800;text-align:center}
|
|
2247
|
-
.kumpul-plan-simulator{margin-top:18px;padding:20px;border:1px solid var(--kt-border);border-radius:18px;background:var(--kt-surface);box-shadow:0 8px 26px #0f172a0a}.kumpul-plan-simulator-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.kumpul-plan-simulator-heading h2{margin:0;font-size:19px;letter-spacing:-.025em}.kumpul-plan-simulator-heading .kumpul-eyebrow{margin-bottom:7px}.kumpul-plan-simulator-heading>div>p:last-child{margin:7px 0 0;color:var(--kt-muted);font-size:10px;line-height:1.55}.kumpul-plan-simulation-badge{padding:6px 9px;flex:none;border-radius:99px;background:#e6f4f6;color:var(--kt-accent);font-size:8px;font-weight:800}.kumpul-plan-simulation-note{margin:15px 0;padding:10px 12px;border:1px solid var(--kt-border);border-radius:10px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px;line-height:1.55}.kumpul-plan-sim-steps{margin:17px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none}.kumpul-plan-sim-steps li{min-width:0;border-top:2px solid var(--kt-border)}.kumpul-plan-sim-steps li.is-current,.kumpul-plan-sim-steps li.is-complete{border-color:var(--kt-accent)}.kumpul-plan-sim-steps button{width:100%;padding:10px 5px 4px;display:flex;align-items:center;gap:6px;border:0;background:none;color:var(--kt-muted);font:inherit;font-size:8px;font-weight:750;text-align:left}.kumpul-plan-sim-steps li.is-current button,.kumpul-plan-sim-steps li.is-complete button{color:var(--kt-text)}.kumpul-plan-sim-steps button:disabled{cursor:not-allowed;opacity:.65}.kumpul-plan-sim-steps button:not(:disabled){cursor:pointer}.kumpul-plan-sim-steps button>span:first-child{width:20px;height:20px;flex:none;display:grid;place-items:center;border:1px solid var(--kt-border);border-radius:50%;font-size:8px}.kumpul-plan-sim-steps li.is-current button>span:first-child,.kumpul-plan-sim-steps li.is-complete button>span:first-child{border-color:var(--kt-accent);background:var(--kt-accent);color:#fff}.kumpul-plan-sim-panel{margin-top:17px}.kumpul-plan-sim-panel[hidden],.kumpul-plan-sim-complete[hidden]{display:none}.kumpul-plan-sim-panel h3,.kumpul-plan-sim-complete h3{margin:0;font-size:15px}.kumpul-plan-sim-help{margin:6px 0 14px;color:var(--kt-muted);font-size:9px;line-height:1.5}.kumpul-plan-sim-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.kumpul-plan-sim-form label,.kumpul-plan-sim-invite-form label,.kumpul-plan-sim-person>label{min-width:0;display:grid;gap:5px;color:var(--kt-muted);font-size:9px;font-weight:700}.kumpul-plan-sim-form input,.kumpul-plan-sim-form select,.kumpul-plan-sim-invite-form input,.kumpul-plan-sim-invitees input,.kumpul-plan-sim-person select{width:100%;min-width:0;min-height:37px;padding:8px 9px;border:1px solid var(--kt-border);border-radius:9px;background:#fff;color:var(--kt-text);font:inherit;font-size:10px}.kumpul-plan-sim-options{min-width:0;margin:15px 0 0;padding:11px;border:1px solid var(--kt-border);border-radius:11px}.kumpul-plan-sim-options legend{padding:0 5px;color:var(--kt-text);font-size:10px;font-weight:800}.kumpul-plan-sim-option{margin:5px 10px 5px 0;display:inline-flex;align-items:center;gap:6px;color:var(--kt-muted);font-size:9px}.kumpul-plan-sim-option input{accent-color:var(--kt-accent)}.kumpul-plan-sim-actions{margin-top:15px;display:flex;justify-content:flex-end;gap:8px}.kumpul-plan-sim-actions button,.kumpul-plan-sim-invite-form button,.kumpul-plan-sim-invitees button,.kumpul-plan-sim-payment button,.kumpul-plan-sim-complete button{min-height:36px;padding:8px 12px;border:1px solid var(--kt-border);border-radius:9px;background:#fff;color:var(--kt-text);font:inherit;font-size:9px;font-weight:800;cursor:pointer}.kumpul-plan-sim-actions .kumpul-plan-sim-primary{border-color:var(--kt-accent);background:var(--kt-accent);color:#fff}.kumpul-plan-sim-actions .kumpul-plan-sim-secondary{color:var(--kt-accent)}.kumpul-plan-sim-error{margin:12px 0 0;color:#b91c1c;font-size:9px;font-weight:700}.kumpul-plan-sim-invite-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:9px}.kumpul-plan-sim-invitees{margin:12px 0 0;padding:0;display:grid;gap:7px;list-style:none}.kumpul-plan-sim-invitees li{display:flex;align-items:center;gap:8px}.kumpul-plan-sim-invitees li>div{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:8px}.kumpul-plan-sim-invitees button,.kumpul-plan-sim-payment button{min-height:33px;padding:7px 9px;color:var(--kt-accent)}.kumpul-plan-sim-participants,.kumpul-plan-sim-payments{display:grid;gap:9px}.kumpul-plan-sim-person{padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 170px;align-items:center;gap:11px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-bg)}.kumpul-plan-sim-person-heading{min-width:0;display:grid;gap:3px}.kumpul-plan-sim-person-heading strong{font-size:10px}.kumpul-plan-sim-person-heading span{overflow-wrap:anywhere;color:var(--kt-muted);font-size:8px}.kumpul-plan-sim-person-options{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kumpul-plan-sim-payment{grid-template-columns:minmax(0,1fr) auto}.kumpul-plan-sim-payment[data-sim-paid=true]{border-color:var(--kt-success);background:#effaf5}.kumpul-plan-sim-final-group{margin:7px 0 0;padding:8px;border:1px solid var(--kt-border);border-radius:9px}.kumpul-plan-sim-final-group legend{padding:0 4px;font-size:9px;font-weight:800}.kumpul-plan-sim-final-group label{margin:5px 10px 5px 0;display:inline-flex;align-items:center;gap:6px;color:var(--kt-muted);font-size:9px}.kumpul-plan-sim-final-group input{accent-color:var(--kt-accent)}.kumpul-plan-sim-complete{margin-top:18px;padding:22px;border:1px solid #8bd1ae;border-radius:13px;background:#effaf5;text-align:center}.kumpul-plan-sim-complete>span{width:34px;height:34px;margin:0 auto 9px;display:grid;place-items:center;border-radius:50%;background:var(--kt-success);color:#fff;font-weight:900}.kumpul-plan-sim-complete p{margin:7px 0 13px;color:var(--kt-muted);font-size:9px;line-height:1.5}
|
|
2964
|
+
.kumpul-plan-simulator{margin-top:18px;padding:20px;border:1px solid var(--kt-border);border-radius:18px;background:var(--kt-surface);box-shadow:0 8px 26px #0f172a0a}.kumpul-plan-simulator-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.kumpul-plan-simulator-heading h2{margin:0;font-size:19px;letter-spacing:-.025em}.kumpul-plan-simulator-heading .kumpul-eyebrow{margin-bottom:7px}.kumpul-plan-simulator-heading>div>p:last-child{margin:7px 0 0;color:var(--kt-muted);font-size:10px;line-height:1.55}.kumpul-plan-simulation-badge{padding:6px 9px;flex:none;border-radius:99px;background:#e6f4f6;color:var(--kt-accent);font-size:8px;font-weight:800}.kumpul-plan-simulation-note{margin:15px 0;padding:10px 12px;border:1px solid var(--kt-border);border-radius:10px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px;line-height:1.55}.kumpul-plan-sim-steps{margin:17px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none}.kumpul-plan-sim-steps li{min-width:0;border-top:2px solid var(--kt-border)}.kumpul-plan-sim-steps li.is-current,.kumpul-plan-sim-steps li.is-complete{border-color:var(--kt-accent)}.kumpul-plan-sim-steps button{width:100%;padding:10px 5px 4px;display:flex;align-items:center;gap:6px;border:0;background:none;color:var(--kt-muted);font:inherit;font-size:8px;font-weight:750;text-align:left}.kumpul-plan-sim-steps li.is-current button,.kumpul-plan-sim-steps li.is-complete button{color:var(--kt-text)}.kumpul-plan-sim-steps button:disabled{cursor:not-allowed;opacity:.65}.kumpul-plan-sim-steps button:not(:disabled){cursor:pointer}.kumpul-plan-sim-steps button>span:first-child{width:20px;height:20px;flex:none;display:grid;place-items:center;border:1px solid var(--kt-border);border-radius:50%;font-size:8px}.kumpul-plan-sim-steps li.is-current button>span:first-child,.kumpul-plan-sim-steps li.is-complete button>span:first-child{border-color:var(--kt-accent);background:var(--kt-accent);color:#fff}.kumpul-plan-sim-panel{margin-top:17px}.kumpul-plan-sim-panel[hidden],.kumpul-plan-sim-complete[hidden]{display:none}.kumpul-plan-sim-panel h3,.kumpul-plan-sim-complete h3{margin:0;font-size:15px}.kumpul-plan-sim-help{margin:6px 0 14px;color:var(--kt-muted);font-size:9px;line-height:1.5}.kumpul-plan-sim-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.kumpul-plan-sim-form label,.kumpul-plan-sim-invite-form label,.kumpul-plan-sim-person>label{min-width:0;display:grid;gap:5px;color:var(--kt-muted);font-size:9px;font-weight:700}.kumpul-plan-sim-form input,.kumpul-plan-sim-form select,.kumpul-plan-sim-invite-form input,.kumpul-plan-sim-invitees input,.kumpul-plan-sim-person select{width:100%;min-width:0;min-height:37px;padding:8px 9px;border:1px solid var(--kt-border);border-radius:9px;background:#fff;color:var(--kt-text);font:inherit;font-size:10px}.kumpul-plan-sim-options{min-width:0;margin:15px 0 0;padding:11px;border:1px solid var(--kt-border);border-radius:11px}.kumpul-plan-sim-options legend{padding:0 5px;color:var(--kt-text);font-size:10px;font-weight:800}.kumpul-plan-sim-option{margin:5px 10px 5px 0;display:inline-flex;align-items:center;gap:6px;color:var(--kt-muted);font-size:9px}.kumpul-plan-sim-option input{accent-color:var(--kt-accent)}.kumpul-plan-sim-actions{margin-top:15px;display:flex;justify-content:flex-end;gap:8px}.kumpul-plan-sim-actions button,.kumpul-plan-sim-invite-form button,.kumpul-plan-sim-invitees button,.kumpul-plan-sim-payment button,.kumpul-plan-sim-complete button{min-height:36px;padding:8px 12px;border:1px solid var(--kt-border);border-radius:9px;background:#fff;color:var(--kt-text);font:inherit;font-size:9px;font-weight:800;cursor:pointer}.kumpul-plan-sim-actions .kumpul-plan-sim-primary{border-color:var(--kt-accent);background:var(--kt-accent);color:#fff}.kumpul-plan-sim-actions .kumpul-plan-sim-secondary{color:var(--kt-accent)}.kumpul-plan-sim-error{margin:12px 0 0;color:#b91c1c;font-size:9px;font-weight:700}.kumpul-plan-sim-invite-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:9px}.kumpul-plan-sim-invitees{margin:12px 0 0;padding:0;display:grid;gap:7px;list-style:none}.kumpul-plan-sim-invitees li{display:flex;align-items:center;gap:8px}.kumpul-plan-sim-invitees li>div{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:8px}.kumpul-plan-sim-invitees button,.kumpul-plan-sim-payment button{min-height:33px;padding:7px 9px;color:var(--kt-accent)}.kumpul-plan-sim-participants,.kumpul-plan-sim-payments{display:grid;gap:9px}.kumpul-plan-sim-person{padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 170px;align-items:center;gap:11px;border:1px solid var(--kt-border);border-radius:12px;background:var(--kt-bg)}.kumpul-plan-sim-person-heading{min-width:0;display:grid;gap:3px}.kumpul-plan-sim-person-heading strong{font-size:10px}.kumpul-plan-sim-person-heading span{overflow-wrap:anywhere;color:var(--kt-muted);font-size:8px}.kumpul-plan-sim-person-options{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kumpul-plan-sim-payment{grid-template-columns:minmax(0,1fr) auto}.kumpul-plan-sim-payment[data-sim-paid=true]{border-color:var(--kt-success);background:#effaf5}.kumpul-plan-sim-final-group{margin:7px 0 0;padding:8px;border:1px solid var(--kt-border);border-radius:9px}.kumpul-plan-sim-final-group legend{padding:0 4px;font-size:9px;font-weight:800}.kumpul-plan-sim-final-group label{margin:5px 10px 5px 0;display:inline-flex;align-items:center;gap:6px;color:var(--kt-muted);font-size:9px}.kumpul-plan-sim-final-group input{accent-color:var(--kt-accent)}.kumpul-plan-sim-complete{margin-top:18px;padding:22px;border:1px solid #8bd1ae;border-radius:13px;background:#effaf5;text-align:center}.kumpul-plan-sim-complete>span{width:34px;height:34px;margin:0 auto 9px;display:grid;place-items:center;border-radius:50%;background:var(--kt-success);color:#fff;font-weight:900}.kumpul-plan-sim-complete p{margin:7px 0 13px;color:var(--kt-muted);font-size:9px;line-height:1.5}.kumpul-plan-live .kumpul-plan-sim-steps{position:sticky;top:var(--kumpul-header-height,0px);z-index:8;padding-top:10px;background:var(--kt-surface)}.kumpul-plan-live-dates{margin-top:11px;grid-template-columns:repeat(3,minmax(0,1fr))}.kumpul-plan-live .kumpul-plan-sim-option{width:100%;margin:7px 0;display:flex;align-items:flex-start}.kumpul-plan-live .kumpul-plan-sim-option>span{display:grid;gap:3px}.kumpul-plan-live .kumpul-plan-sim-option small{color:var(--kt-muted);font-size:8px;line-height:1.45}.kumpul-plan-live .kumpul-plan-sim-invite-form{margin-bottom:12px;grid-template-columns:repeat(3,minmax(0,1fr)) auto}.kumpul-plan-live-readonly{margin:6px 0 12px;padding:8px 10px;border-radius:9px;background:var(--kt-bg);color:var(--kt-muted);font-size:9px}.kumpul-plan-live-people{margin:12px 0 0;padding:0;display:grid;gap:8px;list-style:none}.kumpul-plan-live-people .kumpul-plan-sim-person{grid-template-columns:minmax(0,1fr) auto}.kumpul-plan-live-person-name{display:flex;align-items:center;gap:8px}.kumpul-plan-live-person-name input{accent-color:var(--kt-accent)}.kumpul-plan-live-row-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;font-size:9px;font-weight:800}.kumpul-plan-live-row-actions a{color:var(--kt-accent)}.kumpul-plan-live-row-actions button{min-height:32px;padding:6px 10px;border:1px solid var(--kt-border);border-radius:9px;background:#fff;color:var(--kt-accent);font:inherit;cursor:pointer}.kumpul-plan-live-public{margin:0 0 12px;padding:10px 12px;border:1px dashed var(--kt-accent);border-radius:11px;color:var(--kt-muted);font-size:9px}.kumpul-plan-live-public a{color:var(--kt-accent);font-weight:800}.kumpul-plan-live-operation{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#e6f4f6;color:var(--kt-text);font-size:9px}.kumpul-plan-live-operation.is-failed{background:#fdecec;color:#b91c1c}.kumpul-plan-live-reason{margin-top:12px;display:grid;gap:5px;color:var(--kt-muted);font-size:9px;font-weight:700}.kumpul-plan-live-reason textarea,.kumpul-plan-live-cancel input{width:100%;padding:8px 9px;border:1px solid var(--kt-border);border-radius:9px;font:inherit;font-size:10px}.kumpul-plan-live .kumpul-plan-sim-final-group{display:grid;gap:4px}.kumpul-plan-live .kumpul-plan-sim-final-group p{margin:0;color:var(--kt-muted);font-size:9px}.kumpul-plan-live-cancel{margin-top:18px;padding-top:12px;border-top:1px solid var(--kt-border);font-size:10px}.kumpul-plan-live-cancel summary{color:#b91c1c;font-weight:800;cursor:pointer}.kumpul-plan-live-cancel label{margin:10px 0;display:grid;gap:5px;color:var(--kt-muted);font-size:9px;font-weight:700}.kumpul-plan-live-danger{min-height:36px;padding:8px 12px;border:0;border-radius:9px;background:#b91c1c;color:#fff;font:inherit;font-size:9px;font-weight:800;cursor:pointer}.kumpul-plan-live button:disabled{cursor:not-allowed;opacity:.55}@media(max-width:760px){.kumpul-plan-live-dates,.kumpul-plan-live .kumpul-plan-sim-invite-form,.kumpul-plan-live-people .kumpul-plan-sim-person{grid-template-columns:1fr}.kumpul-plan-live-row-actions{justify-content:flex-start}}
|
|
2248
2965
|
@media(max-width:760px){.kumpul-plan-heading{flex-direction:column;gap:12px}.kumpul-plan-workflow{padding:14px}.kumpul-plan-workflow ol{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kumpul-plan-workflow li{padding:9px 5px 0;font-size:8px}.kumpul-plan-layout{grid-template-columns:1fr;gap:13px}.kumpul-plan-aside{position:static}.kumpul-plan-simulator{padding:15px}.kumpul-plan-simulator-heading{flex-direction:column;gap:10px}.kumpul-plan-sim-form{grid-template-columns:1fr}.kumpul-plan-sim-invite-form{grid-template-columns:1fr}.kumpul-plan-sim-invite-form button{width:100%}.kumpul-plan-sim-invitees li{align-items:flex-start;flex-direction:column}.kumpul-plan-sim-invitees li>div{width:100%;grid-template-columns:1fr}.kumpul-plan-sim-invitees button{align-self:flex-end}.kumpul-plan-sim-person{grid-template-columns:1fr}.kumpul-plan-sim-person-options{grid-template-columns:1fr}.kumpul-plan-sim-payment{grid-template-columns:1fr}.kumpul-plan-sim-payment button{width:100%}.kumpul-plan-sim-steps button{align-items:flex-start;flex-direction:column;font-size:7px}.kumpul-plan-sim-actions{flex-wrap:wrap}.kumpul-plan-sim-actions button{flex:1}}
|
|
2249
2966
|
@media(max-width:760px){.kumpul-detail-heading{align-items:flex-start;flex-direction:column}.kumpul-detail-layout{grid-template-columns:1fr;gap:13px}.kumpul-detail-aside{position:static}.kumpul-detail-card{padding:16px}.kumpul-detail-fields{gap:13px}.kumpul-detail-total strong{font-size:19px}.kumpul-detail-item{grid-template-columns:40px minmax(0,1fr);gap:10px}.kumpul-detail-item-art{width:40px;height:40px}.kumpul-detail-item>strong{grid-column:2}.kumpul-detail-page .kumpul-detail-preview-note{font-size:9px}}
|
|
2967
|
+
.kumpul-transaction-actions .kumpul-transaction-action-link{display:inline-flex;min-height:34px;align-items:center;justify-content:center;padding:7px 11px;border:1px solid var(--kt-border);border-radius:10px;background:var(--kt-surface);color:var(--kt-text);font-size:9px;font-weight:750;text-decoration:none}
|
|
2968
|
+
.kumpul-transaction-actions .kumpul-transaction-action-link:hover{border-color:var(--kt-accent);color:var(--kt-accent)}
|
|
2969
|
+
a.kumpul-billing-action{display:inline-flex;align-items:center;text-decoration:none;opacity:1;cursor:pointer}
|
|
2970
|
+
.kumpul-billing-action:not(:disabled),.kumpul-detail-aside>button:not(:disabled),.kumpul-cart-checkout:not(:disabled){opacity:1;cursor:pointer}
|
|
2971
|
+
.kumpul-detail-aside>.kumpul-detail-pay-link{display:flex;width:100%;min-height:42px;margin-top:16px;align-items:center;justify-content:center;border-radius:11px;background:var(--kt-accent);color:#fff;font-size:11px;font-weight:800;text-decoration:none}
|
|
2972
|
+
.kumpul-header-only .kumpul-header{position:static}
|
|
2973
|
+
a.kumpul-calendar-action{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;opacity:1;cursor:pointer}
|
|
2250
2974
|
@media(max-width:900px){.kumpul-header-main{padding:12px 20px}.kumpul-utilities>a span{display:none}.kumpul-utilities>a{padding:9px}.kumpul-main{padding:24px 20px 60px}.kumpul-hero{grid-template-columns:1fr}.kumpul-hero-copy{padding:38px}.kumpul-feature-card{min-height:310px}.kumpul-about-section{grid-template-columns:1fr .8fr;gap:24px}.kumpul-about-art,.kumpul-about-image{min-height:230px}.kumpul-process-list{grid-template-columns:repeat(2,minmax(0,1fr))}.kumpul-process-step+.kumpul-process-step{border-left:0}.kumpul-process-step:nth-child(even){border-left:1px solid var(--kt-border)}.kumpul-process-step:nth-child(n+3){border-top:1px solid var(--kt-border)}.kumpul-gathering-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kumpul-location-list{grid-template-columns:repeat(2,minmax(0,1fr))}.kumpul-category-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.kumpul-calendar-heading{align-items:flex-start;flex-direction:column}.kumpul-calendar-stats{width:100%}.kumpul-cta{align-items:flex-start;flex-direction:column}}
|
|
2251
2975
|
@media(max-width:620px){.kumpul-header-main{min-height:64px;padding:9px 16px}.kumpul-logo,.kumpul-logo-mark{width:40px;height:40px;border-radius:13px}.kumpul-brand-copy strong{font-size:15px}.kumpul-brand-copy small{font-size:8px}.kumpul-utilities{display:none}.kumpul-page-nav{min-height:47px;justify-content:flex-start;overflow-x:auto;padding:5px 12px}.kumpul-page-nav a{padding:7px 12px;font-size:11px}.kumpul-main{padding:16px 14px 98px}.kumpul-hero{border-radius:21px}.kumpul-hero-copy{padding:27px 22px}.kumpul-community-pill{margin-bottom:17px;font-size:9px}.kumpul-hero h1{font-size:clamp(39px,12vw,58px)}.kumpul-hero-description{margin-top:15px;font-size:13px}.kumpul-hero-actions{gap:8px;margin-top:19px}.kumpul-button{min-height:42px;padding:10px 13px;font-size:11px}.kumpul-stats{gap:20px;margin-top:22px}.kumpul-stat strong{font-size:18px}.kumpul-stat span{font-size:9px}.kumpul-feature-card{min-height:250px;padding:16px}.kumpul-feature-art>span{width:86px;height:86px;font-size:42px}.kumpul-about-section{margin-top:0;padding:22px;grid-template-columns:1fr;border-radius:21px}.kumpul-about-copy h1{font-size:clamp(34px,10vw,48px)}.kumpul-about-body{font-size:13px}.kumpul-about-art,.kumpul-about-image{min-height:230px}.kumpul-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:135px;gap:9px}.kumpul-gallery-item:nth-child(3n+2){grid-row:span 1}.kumpul-gallery-item:nth-child(4n+1){grid-row:span 2}.kumpul-gallery-item>span{font-size:38px}.kumpul-process-list{grid-template-columns:1fr}.kumpul-process-step{padding:14px;display:grid;grid-template-columns:34px 1fr;column-gap:12px}.kumpul-process-step+.kumpul-process-step,.kumpul-process-step:nth-child(even),.kumpul-process-step:nth-child(n+3){border-top:1px solid var(--kt-border);border-left:0}.kumpul-process-step .kumpul-flow-number{grid-row:span 2}.kumpul-process-step small{grid-column:2}.kumpul-section{margin-top:48px}.kumpul-section-heading .kumpul-section-title,.kumpul-cta h2{font-size:29px}.kumpul-section-description{font-size:12px}.kumpul-flow-list{grid-template-columns:1fr;border-radius:16px}.kumpul-flow-step{min-height:0;padding:13px 15px;display:grid;grid-template-columns:34px 1fr;column-gap:11px}.kumpul-flow-step+.kumpul-flow-step{border-top:1px solid var(--kt-border);border-left:0}.kumpul-flow-number{grid-row:span 2}.kumpul-flow-step strong{margin:0}.kumpul-flow-step>span:last-child{font-size:10px}.kumpul-section-topline{align-items:flex-start}.kumpul-text-link{margin-top:5px;font-size:10px}.kumpul-catalog-heading{align-items:stretch;flex-direction:column;gap:16px}.kumpul-catalog-search{width:100%;min-height:44px}.kumpul-category-filters{grid-template-columns:1fr 1fr;gap:8px}.kumpul-category-filter{padding:9px;gap:8px}.kumpul-category-icon{width:32px;height:32px}.kumpul-category-filter strong{font-size:10px}.kumpul-category-filter small{font-size:8px}.kumpul-gathering-grid{grid-template-columns:1fr;gap:12px}.kumpul-gathering-card{display:grid;grid-template-columns:112px 1fr}.kumpul-gathering-art{min-height:100%;}.kumpul-gathering-art>span:first-child{font-size:36px}.kumpul-card-content{min-width:0;padding:12px}.kumpul-card-content h3{font-size:13px}.kumpul-card-meta{font-size:9px}.kumpul-card-bottom{margin-top:9px;padding-top:8px}.kumpul-card-bottom strong{font-size:10px}.kumpul-card-bottom span{font-size:9px}.kumpul-calendar{margin-top:0}.kumpul-calendar-title{font-size:34px}.kumpul-calendar-description{font-size:12px}.kumpul-calendar-stats{gap:7px}.kumpul-calendar-stat{min-width:0;flex:1;padding:10px}.kumpul-calendar-stat strong{font-size:16px}.kumpul-calendar-stat span{font-size:9px}.kumpul-calendar-card{align-items:flex-start;flex-direction:column;padding:15px}.kumpul-calendar-invitation-action{width:100%;justify-items:start}.kumpul-calendar-action{min-height:36px}.kumpul-section-topline{align-items:flex-start}.kumpul-text-link{margin-top:5px;font-size:10px}.kumpul-testimonial-grid{grid-template-columns:1fr}.kumpul-location-list{grid-template-columns:1fr}.kumpul-cta{margin-top:48px;padding:25px 20px;border-radius:19px}.kumpul-cta-actions{width:100%}.kumpul-cta-actions .kumpul-button{flex:1}.kumpul-footer{padding:20px 15px 95px;flex-direction:column}.kumpul-mobile-dock{position:fixed;z-index:5;right:0;bottom:0;left:0;padding:9px 5px max(9px,env(safe-area-inset-bottom));display:flex;justify-content:space-around;border-top:1px solid var(--kt-border);background:#fffffff2;backdrop-filter:blur(14px)}.kumpul-mobile-dock a{min-width:0;display:grid;justify-items:center;gap:3px;color:var(--kt-muted);font-size:8px}.kumpul-mobile-dock .kumpul-icon{width:19px;height:19px}}
|
|
2252
2976
|
@media(prefers-reduced-motion:reduce){.kumpul-template *{scroll-behavior:auto!important;transition:none!important}}
|
|
2253
2977
|
`;
|
|
2254
2978
|
}
|
|
2255
|
-
function render(
|
|
2979
|
+
function render(inputProps = {}) {
|
|
2980
|
+
const kumpulPage = adaptPage(inputProps.page);
|
|
2981
|
+
const props = kumpulPage ? { ...inputProps, kumpulPage } : inputProps;
|
|
2256
2982
|
const colors = themeColors(props);
|
|
2257
2983
|
const sections = list(props.sections);
|
|
2984
|
+
if (props.headerOnly === true) {
|
|
2985
|
+
return h(
|
|
2986
|
+
"div",
|
|
2987
|
+
{ className: "kumpul-template kumpul-header-only" },
|
|
2988
|
+
h("style", { dangerouslySetInnerHTML: { __html: styles(colors) } }),
|
|
2989
|
+
h(Header, { ...props, activePageSlug: "" })
|
|
2990
|
+
);
|
|
2991
|
+
}
|
|
2258
2992
|
const orderDetailSection = sections.find((section) => section?.type === "order_detail");
|
|
2259
|
-
const activePageSlug = orderDetailSection ? orderDetailSection.content?.gatheringPlan ? "plan-detail" : "transaction-detail" : ["cart", "orders", "tagihan", "invoice-detail", "transaction-detail", "plan-detail"].includes(props.activePageSlug) ? props.activePageSlug : pageSlugForSections(sections);
|
|
2993
|
+
const activePageSlug = kumpulPage ? kumpulPage.activePageSlug : orderDetailSection ? orderDetailSection.content?.gatheringPlan ? "plan-detail" : "transaction-detail" : ["cart", "orders", "tagihan", "invoice-detail", "transaction-detail", "plan-detail"].includes(props.activePageSlug) ? props.activePageSlug : pageSlugForSections(sections);
|
|
2994
|
+
const calendarPageSection = kumpulPage && kumpulPage.calendar ? { id: "kalender-acara", type: "gathering_calendar", content: kumpulPage.calendar } : null;
|
|
2260
2995
|
const catalogPage = activePageSlug === "gathering";
|
|
2261
2996
|
const billingPage = activePageSlug === "tagihan";
|
|
2262
2997
|
const transactionsPage = activePageSlug === "orders";
|
|
@@ -2286,7 +3021,7 @@ function render(props = {}) {
|
|
|
2286
3021
|
gatherings ? h(GatheringsSection, { props, section: gatherings, catalogPage }) : null,
|
|
2287
3022
|
sections.filter((section) => section?.type === "service_process_section").map((section) => h(ProcessSection, { ...section, key: section.id || "process" })),
|
|
2288
3023
|
sections.filter((section) => section?.type === "faq_list").map((section) => h(FaqSection, { props, section, key: section.id || "faq" })),
|
|
2289
|
-
|
|
3024
|
+
calendarPageSection ? h(CalendarSection, { props, section: calendarPageSection, key: "calendar" }) : null,
|
|
2290
3025
|
billingPage ? h(BillingSection, { props }) : null,
|
|
2291
3026
|
transactionsPage ? h(TransactionsSection, { props }) : null,
|
|
2292
3027
|
cartPage ? h(CartSection, { props }) : null,
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifestVersion": 1,
|
|
3
3
|
"slug": "kumpul",
|
|
4
4
|
"name": "Kumpul",
|
|
5
|
-
"version": "1.0
|
|
5
|
+
"version": "1.2.0",
|
|
6
6
|
"rendererApiVersion": 1,
|
|
7
7
|
"businessProfiles": [
|
|
8
8
|
"gathering"
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
"locations_list",
|
|
30
30
|
"cta"
|
|
31
31
|
],
|
|
32
|
+
"pageOverrides": [
|
|
33
|
+
"header",
|
|
34
|
+
"cart",
|
|
35
|
+
"orders",
|
|
36
|
+
"order_detail",
|
|
37
|
+
"tagihan",
|
|
38
|
+
"invoice_detail",
|
|
39
|
+
"calendar",
|
|
40
|
+
"gathering_plan"
|
|
41
|
+
],
|
|
32
42
|
"entry": {
|
|
33
43
|
"server": "dist/server.cjs",
|
|
34
44
|
"client": "dist/client.js"
|