Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+49
@@ -0,0 +1,49 @@
|
||||
import type { VMState } from "../index.js";
|
||||
|
||||
/**
|
||||
* AK-P16b · booking-pages list view-model (M06 Block E.1, interim UI AD-28).
|
||||
* Pure (DoD A.3): the loader resolves the tenant's booking pages and the
|
||||
* absolute public URL per row (no `window.location` access in the screen).
|
||||
*/
|
||||
|
||||
export interface BookingPageListRow {
|
||||
readonly id: string;
|
||||
readonly title: string;
|
||||
readonly slug: string;
|
||||
readonly durationMinutes: number;
|
||||
readonly isPublished: boolean;
|
||||
readonly providerCount: number;
|
||||
readonly editHref: string;
|
||||
readonly publicPath: string;
|
||||
/** Absolute public URL resolved by the loader (origin + publicPath). */
|
||||
readonly publicUrl: string;
|
||||
}
|
||||
|
||||
export interface BookingPagesListData {
|
||||
readonly rows: readonly BookingPageListRow[];
|
||||
readonly canCreate: boolean;
|
||||
readonly newHref: string;
|
||||
readonly emptyHeadlineKey: string;
|
||||
readonly emptyBodyKey: string;
|
||||
}
|
||||
|
||||
export type BookingPagesListVM = VMState<BookingPagesListData>;
|
||||
|
||||
export interface BuildBookingPagesListInput {
|
||||
readonly rows: readonly BookingPageListRow[];
|
||||
readonly canCreate: boolean;
|
||||
readonly newHref: string;
|
||||
}
|
||||
|
||||
export function buildBookingPagesListVM(input: BuildBookingPagesListInput): BookingPagesListVM {
|
||||
return {
|
||||
status: "ready",
|
||||
data: {
|
||||
rows: input.rows,
|
||||
canCreate: input.canCreate,
|
||||
newHref: input.newHref,
|
||||
emptyHeadlineKey: "bookings.pages.empty.headline",
|
||||
emptyBodyKey: "bookings.pages.empty.body",
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user