first commit

This commit is contained in:
Dongho Kim
2025-05-21 15:00:13 +00:00
commit da3ac0e469
39 changed files with 16602 additions and 0 deletions

7
webapp/view/App.view.xml Normal file
View File

@ -0,0 +1,7 @@
<mvc:View controllerName="restaurant.z00124ss25restaurant.controller.App"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:mvc="sap.ui.core.mvc" displayBlock="true"
xmlns="sap.m">
<App id="app">
</App>
</mvc:View>

View File

@ -0,0 +1,149 @@
<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>

View File

@ -0,0 +1,91 @@
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:viz="sap.viz.ui5.controls"
xmlns:viz.data="sap.viz.ui5.data"
xmlns:viz.feeds="sap.viz.ui5.controls.common.feeds"
>
<VBox
class="sapUiContentPadding"
width="100%"
spacing="Large"
height="auto"
>
<!-- Heading -->
<Title
text="Dashboard"
class="sapUiMediumMarginBottom"
/>
<!-- Summary Cards -->
<HBox
justifyContent="SpaceAround"
width="100%"
class="sapUiSmallMarginBottom"
height="auto"
>
<!-- Enhanced VBox with proper height and padding -->
<VBox alignItems="Center" class="dashboardCardReservation" height="200px" justifyContent="SpaceAround">
<ObjectStatus
text="Reservations"
state="Success"
icon="sap-icon://appointment"
class="dashboardCardFontSmall"
/>
<ObjectNumber
number="{dashboard>/totalReservations}"
unit="Total"
class="dashboardCardFontLarge"
emphasized="true"
/>
<HBox height="10px" /> <!-- Spacer -->
</VBox>
<!-- Enhanced VBox with proper height and padding -->
<VBox alignItems="Center" class="dashboardCardRevenue" height="200px" justifyContent="SpaceAround">
<ObjectStatus
text="Revenue"
state="Information"
icon="sap-icon://lead"
class="dashboardCardFontSmall"
/>
<ObjectNumber
number="{dashboard>/totalRevenue}"
unit="EUR"
class="dashboardCardFontLarge"
emphasized="true"
/>
<HBox height="10px" /> <!-- Spacer -->
</VBox>
</HBox>
<!-- Combined Column + Line Chart -->
<viz:VizFrame
id="idComboChart"
width="100%"
height="400px"
uiConfig="{applicationSet:'fiori'}"
vizType="dual_combination"
vizProperties="{ title: {text : 'Overall Status', visible : true}}"
>
<viz:dataset>
<viz.data:FlattenedDataset
data="{dashboard>/monthlyData}"
>
<viz.data:dimensions>
<viz.data:DimensionDefinition name="Month" value="{dashboard>Month}" />
</viz.data:dimensions>
<viz.data:measures>
<viz.data:MeasureDefinition name="Reservations" value="{dashboard>Count}" />
<viz.data:MeasureDefinition name="Revenue" value="{dashboard>Revenue}" />
</viz.data:measures>
</viz.data:FlattenedDataset>
</viz:dataset>
<viz:feeds>
<viz.feeds:FeedItem uid="valueAxis" type="Measure" values="Reservations" />
<viz.feeds:FeedItem uid="valueAxis2" type="Measure" values="Revenue" />
<viz.feeds:FeedItem uid="categoryAxis" type="Dimension" values="Month" />
</viz:feeds>
</viz:VizFrame>
</VBox>
</core:FragmentDefinition>

View File

@ -0,0 +1,125 @@
<core:FragmentDefinition
xmlns="sap.ui.table"
xmlns:m="sap.m"
xmlns:core="sap.ui.core"
>
<Table
id="reservationTable"
selectionMode="MultiToggle"
enableSelectAll="false"
rows="{
path: '/reservationPos',
parameters: {operationMode: 'Server'}
}"
threshold="15"
enableBusyIndicator="true"
ariaLabelledBy="title"
width="100%"
>
<noData>
<m:BusyIndicator class="sapUiMediumMargin" />
</noData>
<extension>
<m:OverflowToolbar style="Clear">
<!-- Left section with title -->
<m:Title
id="title"
text="Reservation Lists"
/>
<!-- Creates space that pushes the following items to the right -->
<m:ToolbarSpacer />
<!-- Right section with controls -->
<m:HBox alignItems="Center" justifyContent="End">
<m:items>
<m:Button
icon="sap-icon://refresh"
tooltip="Reinitialize Model"
press="onModelRefresh"
class="sapUiSmallMarginEnd"
/>
<m:SearchField
id="reservationSearchField"
width="15rem"
placeholder="Search"
liveChange="onSearchLiveChange"
search="onSearch"
showSearchButton="true"
/>
</m:items>
</m:HBox>
</m:OverflowToolbar>
</extension>
<columns>
<Column
sortProperty="ReservationId"
filterProperty="ReservationId"
autoResizable="true"
>
<m:Label text="Reservation Name" />
<template>
<m:Text
text="{ReservationName}"
wrapping="false"
/>
</template>
</Column>
<Column
sortProperty="NumOfGuests"
filterProperty="NumOfGuests"
autoResizable="true"
>
<m:Label text="Number of Guests" />
<template>
<m:Text
text="{NumOfGuests}"
wrapping="false"
/>
</template>
</Column>
<Column
sortProperty="BookedDate"
filterProperty="BookedDate"
autoResizable="true"
>
<m:Label text="Booked Date" />
<template>
<m:Text
text="{path: 'BookedDate', formatter: '.formatDate'}"
wrapping="false"
/>
</template>
</Column>
<Column
sortProperty="BookedTime"
filterProperty="BookedTime"
autoResizable="true"
>
<m:Label text="Booked Time" />
<template>
<m:Text
text="{path: 'BookedTime', formatter: '.formatTime'}"
/>
</template>
</Column>
<Column
sortProperty="BookedPeriod"
filterProperty="BookedPeriod"
autoResizable="true"
>
<m:Label text="Booked Period" />
<template>
<m:Text
text="{BookedPeriod}"
wrapping="false"
/>
</template>
</Column>
</columns>
</Table>
</core:FragmentDefinition>

View File

@ -0,0 +1,70 @@
<mvc:View
controllerName="restaurant.z00124ss25restaurant.controller.manager"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:core="sap.ui.core"
displayBlock="true"
>
<Page
title="Restaurant Management"
enableScrolling="false"
class="sapUiContentPadding"
>
<content>
<IconTabBar
id="idIconTabBar"
expanded="{device>/isNoPhone}"
class="sapUiResponsiveContentPadding"
stretchContentHeight="true"
applyContentPadding="false"
backgroundDesign="Transparent"
headerBackgroundDesign="Transparent"
selectedKey="tabDashboard"
select="onTabSelect"
>
<items>
<!-- Dashboard Tab -->
<IconTabFilter
id="tabDashboard"
key="dashboard"
text="Dashboard"
icon="sap-icon://bbyd-dashboard"
>
<!-- Fragment placeholder - will be loaded in controller -->
<core:Fragment
fragmentName="restaurant.z00124ss25restaurant.view.fragments.ViewDashboard"
type="XML"
/>
</IconTabFilter>
<!-- View Reservation Tab -->
<IconTabFilter
id="tabViewReservation"
key="viewReservation"
text="View Reservation"
icon="sap-icon://list"
>
<!-- Fragment placeholder - will be loaded in controller -->
<core:Fragment
fragmentName="restaurant.z00124ss25restaurant.view.fragments.viewReservation"
type="XML"
/>
</IconTabFilter>
<!-- Create Table Tab -->
<IconTabFilter
id="tabCreateTable"
key="createTable"
text="Table Management"
icon="sap-icon://action-settings"
>
<!-- Fragment placeholder - will be loaded in controller -->
<core:Fragment
fragmentName="restaurant.z00124ss25restaurant.view.fragments.CreateTable"
type="XML"
/>
</IconTabFilter>
</items>
</IconTabBar>
</content>
</Page>
</mvc:View>

View File

@ -0,0 +1,164 @@
<mvc:View
controllerName="restaurant.z00124ss25restaurant.controller.tablePos"
xmlns:mvc="sap.ui.core.mvc"
displayBlock="true"
xmlns="sap.m"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core"
xmlns:l="sap.ui.layout"
>
<Page
id="page"
title="{i18n>title}"
>
<headerContent>
<Button
icon="sap-icon://employee"
text="Manager"
type="Transparent"
press="onManagerPress"
/>
</headerContent>
<content>
<f:SimpleForm
id="reservationForm"
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="Reservation Details" />
<Label
text="Reservation Name"
design="Bold"
required="true"
/>
<Input
id="res-name"
required="true"
placeholder="Enter name for reservation"
maxLength="50"
/>
<Label
text="Number of Guests"
design="Bold"
required="true"
/>
<StepInput
id="num-guests"
required="true"
min="1"
max="12"
step="1"
value="1"
/>
<Label
text="Reservation Date"
labelFor="booked-date"
design="Bold"
/>
<DatePicker
id="booked-date"
class="sapUiSmallMarginBottom"
/>
<Label
text="Reservation Time"
labelFor="booked-time"
design="Bold"
required="true"
/>
<TimePicker
id="booked-time"
valueFormat="HH:mm"
displayFormat="HH:mm"
placeholder="Enter Time"
required="true"
minutesStep="15"
change="handleDateTimeChange"
/>
<Label
text="Available Tables"
design="Bold"
required="true"
/>
<Select
id="table-id"
items="{
path: '/tablePos'
}"
change=".onTableChange"
>
<core:Item
key="{TableId}"
text="{NumberOfSeats} - {Location} - {Decoration}"
/>
</Select>
<Label
text="Booked Period (minutes)"
design="Bold"
required="true"
/>
<StepInput
id="booked-period"
required="true"
min="30"
max="240"
step="15"
value="120"
/>
<Label text="Comments" />
<TextArea
id="comments"
rows="4"
width="100%"
growing="true"
growingMaxLines="10"
placeholder="Enter any special requests or additional information"
/>
</f:content>
</f:SimpleForm>
<l:Grid
defaultSpan="L12 M12 S12"
class="sapUiContentPadding"
>
<HBox
justifyContent="End"
width="100%"
>
<Button
text="Save Reservation"
type="Emphasized"
class="sapUiSmallMarginEnd"
press="onSaveReservation"
/>
<Button
text="Cancel"
type="Reject"
press="onCancelPress"
/>
</HBox>
</l:Grid>
</content>
</Page>
</mvc:View>