order page: integration

This commit is contained in:
2025-10-18 09:26:03 +03:00
parent 039bf64b46
commit 9d4621d0a4
14 changed files with 376 additions and 129 deletions

View File

@@ -95,12 +95,9 @@ export const RESTAURANT_DETAILS_URL = `${BASE_URL}restaurant/selectLanguage/`;
export const PRODUCTS_AND_CATEGORIES_URL = `${BASE_URL}getRestaurantItems/`;
export const PRODUCT_DETAILS_URL = `${BASE_URL}getOptionsForItem/`;
export const ORDERS_URL = `${BASE_URL}customer_orders`;
export const ORDER_DETAILS_URL = `${BASE_URL}restaurant/getOneOrderForWebmenu`;
export const CREATE_ORDER_URL = `${BASE_URL}create_order_webmenu`;
export const TABLES_URL = `${BASE_URL}restaurant/getTables`;
export const LOGIN_URL = `${API_BASE_URL}login`;
export const SEND_OTP_URL = `${API_BASE_URL}sendOtp`;
export const CONFIRM_OTP_URL = `${API_BASE_URL}confirmOtp`;
export const USERS_DATA_URL = `${API_BASE_URL}users`;
export const TABLE_HEADERS = `${API_BASE_URL}tableheader`;
export const PERMISSIONS_DATA_URL = `${API_BASE_URL}permissions`;
export const SINGED_USER_INFO_URL = `${API_BASE_URL}users/authenticated`;
export const ROLES_DATA_URL = `${API_BASE_URL}roles`;

View File

@@ -1,9 +1,5 @@
// zero value may be considered an undefined ... donn't use in enums
import { ColumnType } from "antd/es/table";
import { PermissionType } from "modules/system/rolesManagement/types";
import { TaxType } from "modules/system/taxes/types";
import { QrCode } from "pages/pos/orders/components/order-panel/types";
import { ItemType, OrderType } from "pages/pos/orders/types";
export enum AlignType {
"left" = "left",
@@ -148,25 +144,6 @@ export type LoginUserType = {
password?: string;
};
export type UserType = {
id?: number;
first_name?: string;
last_name?: string;
password?: string;
phone_number?: string;
salary?: any;
employment_date?: any;
email?: string;
username?: string;
personal_image?: any;
identity_card_front?: any;
identity_card_back?: any;
driving_license_front?: any;
driving_license_back?: any;
roles?: RolesType[];
menus: string[];
};
export enum Mode {
Edit = 1,
New = 2,
@@ -297,33 +274,6 @@ export enum TableStatus {
requestPayment = "PENDING_INVOICE",
}
export interface ReservationType {
id: number;
start_datetime: string;
end_datetime: any;
seats_reserved: number;
orders: OrderType[];
invoice: InvoiceType;
}
export interface InvoiceType {
id: number;
number: number;
uuid: string;
sub_total: number;
grand_total: number;
discount_amount: number;
taxes_total: number;
print_times: number;
start_datetime: string;
end_datetime: string;
printed_at: string;
remaining_amount: number;
qr_code: QrCode;
taxes: TaxType[];
items: ItemType[];
}
export interface RegisterType {
id: number;
opening_balance: number;
@@ -339,12 +289,6 @@ export interface SessionPayload {
total_expenses?: number;
}
export interface RolesType {
id: number;
name: string;
permissions: PermissionType[];
}
export enum Roles {
SuperUser = "super-admin",
Admin = "admin",
@@ -399,14 +343,6 @@ export interface User {
role: "admin" | "user";
}
export interface Order {
id: string;
userId: string;
items: CartItem[];
total: number;
status: "pending" | "confirmed" | "completed" | "cancelled";
createdAt: string;
}
export type Locale = "en" | "ar";
export type Theme = "light" | "dark";