Revert "Merge pull request 'Complete Housekeeping migration and /ase cutover' (#52) from codex/housekeeping-complete into main"
This reverts commit488b6e57c4, reversing changes made tob506b4499a.
This commit is contained in:
1 parent
488b6e57c4
commit
b1ddda66ff
802 files changed
+61370
-76659
No files matched your search
@@ -1,47 +0,0 @@
|
||||
import { PERMS } from "@/lib/permission-slugs";
|
||||
import type { HousekeepingPageInput } from "../../../route-handlers";
|
||||
import { hotelQuery } from "../queries/rooms";
|
||||
import { HotelCommandForm } from "./hotel-command-form";
|
||||
import {
|
||||
HotelPageFrame,
|
||||
type HotelPageProps,
|
||||
parseHotelListInput,
|
||||
} from "./hotel-page-frame";
|
||||
|
||||
export function HotelRoomsPage(props: HotelPageProps) {
|
||||
return (
|
||||
<HotelPageFrame
|
||||
title="Rooms"
|
||||
description="Search and operate hotel rooms."
|
||||
result={props.result}
|
||||
forms={
|
||||
props.context.has(PERMS.ROOMS_EDIT) ? (
|
||||
<HotelCommandForm
|
||||
commandId="hotel.rooms.update"
|
||||
buttonLabel="Save room"
|
||||
input={{}}
|
||||
fields={[
|
||||
{ name: "id", label: "Room ID", type: "number", required: true },
|
||||
{ name: "name", label: "Name", type: "text", required: true },
|
||||
]}
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export async function renderHotelRoomsPage(input: HousekeepingPageInput) {
|
||||
const result = await hotelQuery.run(input.context, {
|
||||
routeId: "hotel.rooms",
|
||||
params: input.match.params,
|
||||
list: parseHotelListInput(input.searchParams ?? {}),
|
||||
});
|
||||
return (
|
||||
<HotelRoomsPage
|
||||
context={input.context}
|
||||
result={result}
|
||||
routeId="hotel.rooms"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user