Files
z_00_124_ss25_restaurant/webapp/view/fragments/CreateTable.fragment.xml
2025-05-21 15:00:13 +00:00

150 lines
4.0 KiB
XML

<core:FragmentDefinition
xmlns="sap.m"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core"
xmlns:gantt="sap.gantt"
xmlns:table="sap.ui.table"
>
<f:SimpleForm
id="tableForm"
editable="true"
layout="ResponsiveGridLayout"
labelSpanXL="4"
labelSpanL="4"
labelSpanM="4"
labelSpanS="12"
adjustLabelSpan="false"
emptySpanXL="0"
emptySpanL="0"
emptySpanM="0"
emptySpanS="0"
columnsXL="1"
columnsL="1"
columnsM="1"
singleContainerFullSize="false"
class="sapUiContentPadding"
>
<f:content>
<core:Title text="Table Management" />
<Label
text="Decoration"
design="Bold"
required="true"
/>
<Select
id="decoration"
items="{
path: '/Z_00_124_SS25_DECO'
}"
change=".onTableChange"
>
<core:Item
key="{Decoration}"
text="{Decoration}"
/>
</Select>
<Label
text="Location"
design="Bold"
required="true"
labelFor="location"
/>
<Select
id="location"
items="{
path: '/Z_00_124_SS25_LOC'
}"
change=".onTableChange"
>
<core:Item
key="{Location}"
text="{Location}"
/>
</Select>
<Label
text="Number of Seats"
design="Bold"
required="true"
/>
<StepInput
id="numofseats"
required="true"
min="1"
max="12"
step="1"
value="1"
/>
<!-- Buttons section -->
<HBox justifyContent="End">
<Button
text="Save"
type="Emphasized"
press=".onCreateTable"
/>
<Button
text="Cancel"
press=".onCancelPress"
class="sapUiSmallMarginBegin"
/>
</HBox>
</f:content>
</f:SimpleForm>
<Panel
headerText="Existing Tables"
expandable="true"
expanded="true"
class="sapUiMediumMarginTop"
>
<Table
id="tableList"
items="{ path: '/tablePos' }"
>
<columns>
<Column>
<Text text="Table ID" />
</Column>
<Column>
<Text text="Decoration" />
</Column>
<Column>
<Text text="Location" />
</Column>
<Column>
<Text text="Seats Count" />
</Column>
<Column>
<Text text="Actions" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{TableId}" />
<Text text="{Decoration}" />
<Text text="{Location}" />
<Text text="{NumberOfSeats}" />
<Button
icon="sap-icon://edit"
tooltip="Edit"
type="Transparent"
press=".onEditTable"
/>
</cells>
</ColumnListItem>
</items>
</Table>
</Panel>
<!-- <Panel
headerText="Existing Tables"
expandable="true"
expanded="true"
class="sapUiMediumMarginTop"
>
</Panel> -->
</core:FragmentDefinition>