From 3f8b548cd03914367556450eed2250d15f1c5b8f Mon Sep 17 00:00:00 2001 From: opbnq-q Date: Sun, 16 Mar 2025 10:56:47 +0700 Subject: [PATCH] fix: sorting --- .../bindings/app/internal/models/index.ts | 4 + .../bindings/app/internal/models/models.ts | 629 ++++++++++++++++++ .../app/internal/services/customerservice.ts | 86 +++ .../app/internal/services/excelmodule.ts | 16 + .../bindings/app/internal/services/index.ts | 31 + .../bindings/app/internal/services/models.ts | 43 ++ .../app/internal/services/orderservice.ts | 86 +++ .../app/internal/services/preptaskservice.ts | 86 +++ .../internal/services/producttypeservice.ts | 86 +++ .../app/internal/services/shiftservice.ts | 86 +++ .../app/internal/services/taskservice.ts | 86 +++ .../app/internal/services/teamtaskservice.ts | 86 +++ .../app/internal/services/teamtypeservice.ts | 86 +++ .../app/internal/services/workareaservice.ts | 86 +++ .../app/internal/services/workerservice.ts | 86 +++ .../app/internal/services/workshopservice.ts | 86 +++ frontend/bindings/app/internal/utils/index.ts | 4 + .../bindings/app/internal/utils/models.ts | 31 + frontend/src/table/SortingOptions.vue | 5 +- frontend/src/task/task.service.ts | 12 +- frontend/src/types/sorting.type.ts | 2 +- .../structs/default-sort-options.util.ts | 2 +- 22 files changed, 1717 insertions(+), 8 deletions(-) create mode 100644 frontend/bindings/app/internal/models/index.ts create mode 100644 frontend/bindings/app/internal/models/models.ts create mode 100644 frontend/bindings/app/internal/services/customerservice.ts create mode 100644 frontend/bindings/app/internal/services/excelmodule.ts create mode 100644 frontend/bindings/app/internal/services/index.ts create mode 100644 frontend/bindings/app/internal/services/models.ts create mode 100644 frontend/bindings/app/internal/services/orderservice.ts create mode 100644 frontend/bindings/app/internal/services/preptaskservice.ts create mode 100644 frontend/bindings/app/internal/services/producttypeservice.ts create mode 100644 frontend/bindings/app/internal/services/shiftservice.ts create mode 100644 frontend/bindings/app/internal/services/taskservice.ts create mode 100644 frontend/bindings/app/internal/services/teamtaskservice.ts create mode 100644 frontend/bindings/app/internal/services/teamtypeservice.ts create mode 100644 frontend/bindings/app/internal/services/workareaservice.ts create mode 100644 frontend/bindings/app/internal/services/workerservice.ts create mode 100644 frontend/bindings/app/internal/services/workshopservice.ts create mode 100644 frontend/bindings/app/internal/utils/index.ts create mode 100644 frontend/bindings/app/internal/utils/models.ts diff --git a/frontend/bindings/app/internal/models/index.ts b/frontend/bindings/app/internal/models/index.ts new file mode 100644 index 0000000..c9d993a --- /dev/null +++ b/frontend/bindings/app/internal/models/index.ts @@ -0,0 +1,4 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +export * from "./models.js"; diff --git a/frontend/bindings/app/internal/models/models.ts b/frontend/bindings/app/internal/models/models.ts new file mode 100644 index 0000000..2288e9b --- /dev/null +++ b/frontend/bindings/app/internal/models/models.ts @@ -0,0 +1,629 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +export class Customer { + "Id": number; + "Title": string; + "Contact": string; + "Orders": Order[]; + + /** Creates a new Customer instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Title" in $$source)) { + this["Title"] = ""; + } + if (!("Contact" in $$source)) { + this["Contact"] = ""; + } + if (!("Orders" in $$source)) { + this["Orders"] = []; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Customer instance from a string or object. + */ + static createFrom($$source: any = {}): Customer { + const $$createField3_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Orders" in $$parsedSource) { + $$parsedSource["Orders"] = $$createField3_0($$parsedSource["Orders"]); + } + return new Customer($$parsedSource as Partial); + } +} + +export class Order { + "Id": number; + "Status": string; + "Description": string; + "ProductTypeId": number; + "ProductType": ProductType; + "ProductAmount": number; + "CustomerId": number; + "Customer": Customer; + "Tasks": Task[]; + "CreatedAt": number; + "DeadlineDate": number; + + /** Creates a new Order instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Status" in $$source)) { + this["Status"] = ""; + } + if (!("Description" in $$source)) { + this["Description"] = ""; + } + if (!("ProductTypeId" in $$source)) { + this["ProductTypeId"] = 0; + } + if (!("ProductType" in $$source)) { + this["ProductType"] = (new ProductType()); + } + if (!("ProductAmount" in $$source)) { + this["ProductAmount"] = 0; + } + if (!("CustomerId" in $$source)) { + this["CustomerId"] = 0; + } + if (!("Customer" in $$source)) { + this["Customer"] = (new Customer()); + } + if (!("Tasks" in $$source)) { + this["Tasks"] = []; + } + if (!("CreatedAt" in $$source)) { + this["CreatedAt"] = 0; + } + if (!("DeadlineDate" in $$source)) { + this["DeadlineDate"] = 0; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Order instance from a string or object. + */ + static createFrom($$source: any = {}): Order { + const $$createField4_0 = $$createType2; + const $$createField7_0 = $$createType3; + const $$createField8_0 = $$createType5; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("ProductType" in $$parsedSource) { + $$parsedSource["ProductType"] = $$createField4_0($$parsedSource["ProductType"]); + } + if ("Customer" in $$parsedSource) { + $$parsedSource["Customer"] = $$createField7_0($$parsedSource["Customer"]); + } + if ("Tasks" in $$parsedSource) { + $$parsedSource["Tasks"] = $$createField8_0($$parsedSource["Tasks"]); + } + return new Order($$parsedSource as Partial); + } +} + +export class PrepTask { + "Id": number; + "Status": string; + "Description": string; + "TaskId": number; + "Task": Task; + "WorkAreaId": number; + "WorkArea": WorkArea; + "CreatedAt": number; + "Deadline": number; + + /** Creates a new PrepTask instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Status" in $$source)) { + this["Status"] = ""; + } + if (!("Description" in $$source)) { + this["Description"] = ""; + } + if (!("TaskId" in $$source)) { + this["TaskId"] = 0; + } + if (!("Task" in $$source)) { + this["Task"] = (new Task()); + } + if (!("WorkAreaId" in $$source)) { + this["WorkAreaId"] = 0; + } + if (!("WorkArea" in $$source)) { + this["WorkArea"] = (new WorkArea()); + } + if (!("CreatedAt" in $$source)) { + this["CreatedAt"] = 0; + } + if (!("Deadline" in $$source)) { + this["Deadline"] = 0; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new PrepTask instance from a string or object. + */ + static createFrom($$source: any = {}): PrepTask { + const $$createField4_0 = $$createType4; + const $$createField6_0 = $$createType6; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Task" in $$parsedSource) { + $$parsedSource["Task"] = $$createField4_0($$parsedSource["Task"]); + } + if ("WorkArea" in $$parsedSource) { + $$parsedSource["WorkArea"] = $$createField6_0($$parsedSource["WorkArea"]); + } + return new PrepTask($$parsedSource as Partial); + } +} + +export class ProductType { + "Id": number; + "Name": string; + + /** Creates a new ProductType instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Name" in $$source)) { + this["Name"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new ProductType instance from a string or object. + */ + static createFrom($$source: any = {}): ProductType { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new ProductType($$parsedSource as Partial); + } +} + +export class Shift { + "Id": number; + "Description": string; + "ProductTypeId": number; + "ProductType": ProductType; + "ProductAmount": number; + "ShiftDate": number; + "WorkAreaId": number; + "WorkArea": WorkArea; + "CreatedAt": number; + + /** Creates a new Shift instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Description" in $$source)) { + this["Description"] = ""; + } + if (!("ProductTypeId" in $$source)) { + this["ProductTypeId"] = 0; + } + if (!("ProductType" in $$source)) { + this["ProductType"] = (new ProductType()); + } + if (!("ProductAmount" in $$source)) { + this["ProductAmount"] = 0; + } + if (!("ShiftDate" in $$source)) { + this["ShiftDate"] = 0; + } + if (!("WorkAreaId" in $$source)) { + this["WorkAreaId"] = 0; + } + if (!("WorkArea" in $$source)) { + this["WorkArea"] = (new WorkArea()); + } + if (!("CreatedAt" in $$source)) { + this["CreatedAt"] = 0; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Shift instance from a string or object. + */ + static createFrom($$source: any = {}): Shift { + const $$createField3_0 = $$createType2; + const $$createField7_0 = $$createType6; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("ProductType" in $$parsedSource) { + $$parsedSource["ProductType"] = $$createField3_0($$parsedSource["ProductType"]); + } + if ("WorkArea" in $$parsedSource) { + $$parsedSource["WorkArea"] = $$createField7_0($$parsedSource["WorkArea"]); + } + return new Shift($$parsedSource as Partial); + } +} + +export class Task { + "Id": number; + "Description": string; + "ProductTypeId": number; + "ProductType": ProductType; + "Workshops": (Workshop | null)[]; + "OrderId": number; + "Order": Order; + "PrepTasks": PrepTask[]; + "ProductionStart": number; + "CreatedAt": number; + "Amount": number; + + /** Creates a new Task instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Description" in $$source)) { + this["Description"] = ""; + } + if (!("ProductTypeId" in $$source)) { + this["ProductTypeId"] = 0; + } + if (!("ProductType" in $$source)) { + this["ProductType"] = (new ProductType()); + } + if (!("Workshops" in $$source)) { + this["Workshops"] = []; + } + if (!("OrderId" in $$source)) { + this["OrderId"] = 0; + } + if (!("Order" in $$source)) { + this["Order"] = (new Order()); + } + if (!("PrepTasks" in $$source)) { + this["PrepTasks"] = []; + } + if (!("ProductionStart" in $$source)) { + this["ProductionStart"] = 0; + } + if (!("CreatedAt" in $$source)) { + this["CreatedAt"] = 0; + } + if (!("Amount" in $$source)) { + this["Amount"] = 0; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Task instance from a string or object. + */ + static createFrom($$source: any = {}): Task { + const $$createField3_0 = $$createType2; + const $$createField4_0 = $$createType9; + const $$createField6_0 = $$createType0; + const $$createField7_0 = $$createType11; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("ProductType" in $$parsedSource) { + $$parsedSource["ProductType"] = $$createField3_0($$parsedSource["ProductType"]); + } + if ("Workshops" in $$parsedSource) { + $$parsedSource["Workshops"] = $$createField4_0($$parsedSource["Workshops"]); + } + if ("Order" in $$parsedSource) { + $$parsedSource["Order"] = $$createField6_0($$parsedSource["Order"]); + } + if ("PrepTasks" in $$parsedSource) { + $$parsedSource["PrepTasks"] = $$createField7_0($$parsedSource["PrepTasks"]); + } + return new Task($$parsedSource as Partial); + } +} + +export class TeamTask { + "Id": number; + "TeamTypeId": number; + "TeamType": TeamType; + "TeamLeaderId": number; + "TeamLeader": Worker; + "TeamMembers": (Worker | null)[]; + "WorkStartDate": number; + "WorkAreaId": number; + "WorkArea": WorkArea; + "ShiftDuties": string; + + /** Creates a new TeamTask instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("TeamTypeId" in $$source)) { + this["TeamTypeId"] = 0; + } + if (!("TeamType" in $$source)) { + this["TeamType"] = (new TeamType()); + } + if (!("TeamLeaderId" in $$source)) { + this["TeamLeaderId"] = 0; + } + if (!("TeamLeader" in $$source)) { + this["TeamLeader"] = (new Worker()); + } + if (!("TeamMembers" in $$source)) { + this["TeamMembers"] = []; + } + if (!("WorkStartDate" in $$source)) { + this["WorkStartDate"] = 0; + } + if (!("WorkAreaId" in $$source)) { + this["WorkAreaId"] = 0; + } + if (!("WorkArea" in $$source)) { + this["WorkArea"] = (new WorkArea()); + } + if (!("ShiftDuties" in $$source)) { + this["ShiftDuties"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new TeamTask instance from a string or object. + */ + static createFrom($$source: any = {}): TeamTask { + const $$createField2_0 = $$createType12; + const $$createField4_0 = $$createType13; + const $$createField5_0 = $$createType15; + const $$createField8_0 = $$createType6; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("TeamType" in $$parsedSource) { + $$parsedSource["TeamType"] = $$createField2_0($$parsedSource["TeamType"]); + } + if ("TeamLeader" in $$parsedSource) { + $$parsedSource["TeamLeader"] = $$createField4_0($$parsedSource["TeamLeader"]); + } + if ("TeamMembers" in $$parsedSource) { + $$parsedSource["TeamMembers"] = $$createField5_0($$parsedSource["TeamMembers"]); + } + if ("WorkArea" in $$parsedSource) { + $$parsedSource["WorkArea"] = $$createField8_0($$parsedSource["WorkArea"]); + } + return new TeamTask($$parsedSource as Partial); + } +} + +export class TeamType { + "Id": number; + "Name": string; + + /** Creates a new TeamType instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Name" in $$source)) { + this["Name"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new TeamType instance from a string or object. + */ + static createFrom($$source: any = {}): TeamType { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new TeamType($$parsedSource as Partial); + } +} + +export class WorkArea { + "Id": number; + "Name": string; + "Description": string; + "Performance": number; + "WorkshopId": number; + "Workshop": Workshop; + "PrepTasks": PrepTask[]; + "Shifts": Shift[]; + "TeamTasks": TeamTask[]; + + /** Creates a new WorkArea instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Name" in $$source)) { + this["Name"] = ""; + } + if (!("Description" in $$source)) { + this["Description"] = ""; + } + if (!("Performance" in $$source)) { + this["Performance"] = 0; + } + if (!("WorkshopId" in $$source)) { + this["WorkshopId"] = 0; + } + if (!("Workshop" in $$source)) { + this["Workshop"] = (new Workshop()); + } + if (!("PrepTasks" in $$source)) { + this["PrepTasks"] = []; + } + if (!("Shifts" in $$source)) { + this["Shifts"] = []; + } + if (!("TeamTasks" in $$source)) { + this["TeamTasks"] = []; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new WorkArea instance from a string or object. + */ + static createFrom($$source: any = {}): WorkArea { + const $$createField5_0 = $$createType7; + const $$createField6_0 = $$createType11; + const $$createField7_0 = $$createType17; + const $$createField8_0 = $$createType19; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Workshop" in $$parsedSource) { + $$parsedSource["Workshop"] = $$createField5_0($$parsedSource["Workshop"]); + } + if ("PrepTasks" in $$parsedSource) { + $$parsedSource["PrepTasks"] = $$createField6_0($$parsedSource["PrepTasks"]); + } + if ("Shifts" in $$parsedSource) { + $$parsedSource["Shifts"] = $$createField7_0($$parsedSource["Shifts"]); + } + if ("TeamTasks" in $$parsedSource) { + $$parsedSource["TeamTasks"] = $$createField8_0($$parsedSource["TeamTasks"]); + } + return new WorkArea($$parsedSource as Partial); + } +} + +export class Worker { + "Id": number; + "Name": string; + "TeamTasks": (TeamTask | null)[]; + "Workshop": Workshop; + "WorkshopId": number; + + /** Creates a new Worker instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Name" in $$source)) { + this["Name"] = ""; + } + if (!("TeamTasks" in $$source)) { + this["TeamTasks"] = []; + } + if (!("Workshop" in $$source)) { + this["Workshop"] = (new Workshop()); + } + if (!("WorkshopId" in $$source)) { + this["WorkshopId"] = 0; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Worker instance from a string or object. + */ + static createFrom($$source: any = {}): Worker { + const $$createField2_0 = $$createType21; + const $$createField3_0 = $$createType7; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("TeamTasks" in $$parsedSource) { + $$parsedSource["TeamTasks"] = $$createField2_0($$parsedSource["TeamTasks"]); + } + if ("Workshop" in $$parsedSource) { + $$parsedSource["Workshop"] = $$createField3_0($$parsedSource["Workshop"]); + } + return new Worker($$parsedSource as Partial); + } +} + +export class Workshop { + "Id": number; + "Name": string; + "WorkAreas": WorkArea[]; + "Tasks": (Task | null)[]; + "Workers": Worker[]; + + /** Creates a new Workshop instance. */ + constructor($$source: Partial = {}) { + if (!("Id" in $$source)) { + this["Id"] = 0; + } + if (!("Name" in $$source)) { + this["Name"] = ""; + } + if (!("WorkAreas" in $$source)) { + this["WorkAreas"] = []; + } + if (!("Tasks" in $$source)) { + this["Tasks"] = []; + } + if (!("Workers" in $$source)) { + this["Workers"] = []; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Workshop instance from a string or object. + */ + static createFrom($$source: any = {}): Workshop { + const $$createField2_0 = $$createType22; + const $$createField3_0 = $$createType24; + const $$createField4_0 = $$createType25; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("WorkAreas" in $$parsedSource) { + $$parsedSource["WorkAreas"] = $$createField2_0($$parsedSource["WorkAreas"]); + } + if ("Tasks" in $$parsedSource) { + $$parsedSource["Tasks"] = $$createField3_0($$parsedSource["Tasks"]); + } + if ("Workers" in $$parsedSource) { + $$parsedSource["Workers"] = $$createField4_0($$parsedSource["Workers"]); + } + return new Workshop($$parsedSource as Partial); + } +} + +// Private type creation functions +const $$createType0 = Order.createFrom; +const $$createType1 = $Create.Array($$createType0); +const $$createType2 = ProductType.createFrom; +const $$createType3 = Customer.createFrom; +const $$createType4 = Task.createFrom; +const $$createType5 = $Create.Array($$createType4); +const $$createType6 = WorkArea.createFrom; +const $$createType7 = Workshop.createFrom; +const $$createType8 = $Create.Nullable($$createType7); +const $$createType9 = $Create.Array($$createType8); +const $$createType10 = PrepTask.createFrom; +const $$createType11 = $Create.Array($$createType10); +const $$createType12 = TeamType.createFrom; +const $$createType13 = Worker.createFrom; +const $$createType14 = $Create.Nullable($$createType13); +const $$createType15 = $Create.Array($$createType14); +const $$createType16 = Shift.createFrom; +const $$createType17 = $Create.Array($$createType16); +const $$createType18 = TeamTask.createFrom; +const $$createType19 = $Create.Array($$createType18); +const $$createType20 = $Create.Nullable($$createType18); +const $$createType21 = $Create.Array($$createType20); +const $$createType22 = $Create.Array($$createType6); +const $$createType23 = $Create.Nullable($$createType4); +const $$createType24 = $Create.Array($$createType23); +const $$createType25 = $Create.Array($$createType13); diff --git a/frontend/bindings/app/internal/services/customerservice.ts b/frontend/bindings/app/internal/services/customerservice.ts new file mode 100644 index 0000000..6669ed2 --- /dev/null +++ b/frontend/bindings/app/internal/services/customerservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2456694737) as any; + return $resultPromise; +} + +export function Create(item: $models.Customer): Promise<$models.Customer> & { cancel(): void } { + let $resultPromise = $Call.ByID(2428713966, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(351568709, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Customer | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2094111829) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Customer | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(1898783026, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Customer | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1677934916, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Customer | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3880190910, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Customer): Promise<$models.Customer> & { cancel(): void } { + let $resultPromise = $Call.ByID(2724586067, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Customer.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/excelmodule.ts b/frontend/bindings/app/internal/services/excelmodule.ts new file mode 100644 index 0000000..a3a9b5a --- /dev/null +++ b/frontend/bindings/app/internal/services/excelmodule.ts @@ -0,0 +1,16 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +export function ExportAllEntities(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(794946560) as any; + return $resultPromise; +} + +export function ImportAllEntities(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2992267629) as any; + return $resultPromise; +} diff --git a/frontend/bindings/app/internal/services/index.ts b/frontend/bindings/app/internal/services/index.ts new file mode 100644 index 0000000..59c2f74 --- /dev/null +++ b/frontend/bindings/app/internal/services/index.ts @@ -0,0 +1,31 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +import * as CustomerService from "./customerservice.js"; +import * as ExcelModule from "./excelmodule.js"; +import * as OrderService from "./orderservice.js"; +import * as PrepTaskService from "./preptaskservice.js"; +import * as ProductTypeService from "./producttypeservice.js"; +import * as ShiftService from "./shiftservice.js"; +import * as TaskService from "./taskservice.js"; +import * as TeamTaskService from "./teamtaskservice.js"; +import * as TeamTypeService from "./teamtypeservice.js"; +import * as WorkAreaService from "./workareaservice.js"; +import * as WorkerService from "./workerservice.js"; +import * as WorkshopService from "./workshopservice.js"; +export { + CustomerService, + ExcelModule, + OrderService, + PrepTaskService, + ProductTypeService, + ShiftService, + TaskService, + TeamTaskService, + TeamTypeService, + WorkAreaService, + WorkerService, + WorkshopService +}; + +export * from "./models.js"; diff --git a/frontend/bindings/app/internal/services/models.ts b/frontend/bindings/app/internal/services/models.ts new file mode 100644 index 0000000..5f84c2b --- /dev/null +++ b/frontend/bindings/app/internal/services/models.ts @@ -0,0 +1,43 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; + +export const Customer = models$0.Customer; +export type Customer = models$0.Customer; + +export const Order = models$0.Order; +export type Order = models$0.Order; + +export const PrepTask = models$0.PrepTask; +export type PrepTask = models$0.PrepTask; + +export const ProductType = models$0.ProductType; +export type ProductType = models$0.ProductType; + +export const Shift = models$0.Shift; +export type Shift = models$0.Shift; + +export const Task = models$0.Task; +export type Task = models$0.Task; + +export const TeamTask = models$0.TeamTask; +export type TeamTask = models$0.TeamTask; + +export const TeamType = models$0.TeamType; +export type TeamType = models$0.TeamType; + +export const WorkArea = models$0.WorkArea; +export type WorkArea = models$0.WorkArea; + +export const Worker = models$0.Worker; +export type Worker = models$0.Worker; + +export const Workshop = models$0.Workshop; +export type Workshop = models$0.Workshop; diff --git a/frontend/bindings/app/internal/services/orderservice.ts b/frontend/bindings/app/internal/services/orderservice.ts new file mode 100644 index 0000000..2fd0a72 --- /dev/null +++ b/frontend/bindings/app/internal/services/orderservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2566189339) as any; + return $resultPromise; +} + +export function Create(item: $models.Order): Promise<$models.Order> & { cancel(): void } { + let $resultPromise = $Call.ByID(4046033040, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(1974545647, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Order | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1679856851) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Order | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(1201282680, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Order | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(963444842, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Order | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3596187064, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Order): Promise<$models.Order> & { cancel(): void } { + let $resultPromise = $Call.ByID(358288261, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Order.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/preptaskservice.ts b/frontend/bindings/app/internal/services/preptaskservice.ts new file mode 100644 index 0000000..e95a26d --- /dev/null +++ b/frontend/bindings/app/internal/services/preptaskservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3107879827) as any; + return $resultPromise; +} + +export function Create(item: $models.PrepTask): Promise<$models.PrepTask> & { cancel(): void } { + let $resultPromise = $Call.ByID(3612638808, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(339686919, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.PrepTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2935972059) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.PrepTask | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(785365008, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.PrepTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2705089298, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.PrepTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(423868800, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.PrepTask): Promise<$models.PrepTask> & { cancel(): void } { + let $resultPromise = $Call.ByID(998661645, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.PrepTask.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/producttypeservice.ts b/frontend/bindings/app/internal/services/producttypeservice.ts new file mode 100644 index 0000000..edbad54 --- /dev/null +++ b/frontend/bindings/app/internal/services/producttypeservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3869103122) as any; + return $resultPromise; +} + +export function Create(item: $models.ProductType): Promise<$models.ProductType> & { cancel(): void } { + let $resultPromise = $Call.ByID(2892206627, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2075432208, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.ProductType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(4237247244) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.ProductType | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(3965758897, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.ProductType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2567053163, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.ProductType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2110028149, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.ProductType): Promise<$models.ProductType> & { cancel(): void } { + let $resultPromise = $Call.ByID(2015721618, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.ProductType.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/shiftservice.ts b/frontend/bindings/app/internal/services/shiftservice.ts new file mode 100644 index 0000000..4b7e1ba --- /dev/null +++ b/frontend/bindings/app/internal/services/shiftservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3190120795) as any; + return $resultPromise; +} + +export function Create(item: $models.Shift): Promise<$models.Shift> & { cancel(): void } { + let $resultPromise = $Call.ByID(1438106576, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2919255855, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Shift | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1919901971) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Shift | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(2418071992, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Shift | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2703093162, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Shift | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1476306424, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Shift): Promise<$models.Shift> & { cancel(): void } { + let $resultPromise = $Call.ByID(132402373, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Shift.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/taskservice.ts b/frontend/bindings/app/internal/services/taskservice.ts new file mode 100644 index 0000000..fbd32b5 --- /dev/null +++ b/frontend/bindings/app/internal/services/taskservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2626684778) as any; + return $resultPromise; +} + +export function Create(item: $models.Task): Promise<$models.Task> & { cancel(): void } { + let $resultPromise = $Call.ByID(893779179, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3033756968, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Task | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1660059028) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Task | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(3152185033, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Task | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3905257587, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Task | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2942045693, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Task): Promise<$models.Task> & { cancel(): void } { + let $resultPromise = $Call.ByID(3997472442, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Task.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/teamtaskservice.ts b/frontend/bindings/app/internal/services/teamtaskservice.ts new file mode 100644 index 0000000..dc178fc --- /dev/null +++ b/frontend/bindings/app/internal/services/teamtaskservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3706236529) as any; + return $resultPromise; +} + +export function Create(item: $models.TeamTask): Promise<$models.TeamTask> & { cancel(): void } { + let $resultPromise = $Call.ByID(757028622, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3016324197, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.TeamTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2153018165) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.TeamTask | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(457048658, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.TeamTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(352409060, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.TeamTask | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(1507635678, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.TeamTask): Promise<$models.TeamTask> & { cancel(): void } { + let $resultPromise = $Call.ByID(1052797555, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.TeamTask.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/teamtypeservice.ts b/frontend/bindings/app/internal/services/teamtypeservice.ts new file mode 100644 index 0000000..3e29201 --- /dev/null +++ b/frontend/bindings/app/internal/services/teamtypeservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(1823045730) as any; + return $resultPromise; +} + +export function Create(item: $models.TeamType): Promise<$models.TeamType> & { cancel(): void } { + let $resultPromise = $Call.ByID(3331874131, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(1006566688, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.TeamType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(63845852) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.TeamType | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(1530543873, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.TeamType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(201965595, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.TeamType | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2936929733, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.TeamType): Promise<$models.TeamType> & { cancel(): void } { + let $resultPromise = $Call.ByID(918118946, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.TeamType.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/workareaservice.ts b/frontend/bindings/app/internal/services/workareaservice.ts new file mode 100644 index 0000000..6e53e3e --- /dev/null +++ b/frontend/bindings/app/internal/services/workareaservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2628202257) as any; + return $resultPromise; +} + +export function Create(item: $models.WorkArea): Promise<$models.WorkArea> & { cancel(): void } { + let $resultPromise = $Call.ByID(969170222, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(421967749, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.WorkArea | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2440807317) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.WorkArea | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(2721437042, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.WorkArea | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3482576004, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.WorkArea | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(571753726, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.WorkArea): Promise<$models.WorkArea> & { cancel(): void } { + let $resultPromise = $Call.ByID(2753408403, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.WorkArea.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/workerservice.ts b/frontend/bindings/app/internal/services/workerservice.ts new file mode 100644 index 0000000..bf22488 --- /dev/null +++ b/frontend/bindings/app/internal/services/workerservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3131879451) as any; + return $resultPromise; +} + +export function Create(item: $models.Worker): Promise<$models.Worker> & { cancel(): void } { + let $resultPromise = $Call.ByID(90914192, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2314394095, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Worker | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(2019705299) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Worker | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(721253752, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Worker | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(4245847914, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Worker | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3186234552, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Worker): Promise<$models.Worker> & { cancel(): void } { + let $resultPromise = $Call.ByID(698136709, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Worker.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/services/workshopservice.ts b/frontend/bindings/app/internal/services/workshopservice.ts new file mode 100644 index 0000000..640ac5c --- /dev/null +++ b/frontend/bindings/app/internal/services/workshopservice.ts @@ -0,0 +1,86 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as models$0 from "../models/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as utils$0 from "../utils/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +export function Count(): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(2983034394) as any; + return $resultPromise; +} + +export function Create(item: $models.Workshop): Promise<$models.Workshop> & { cancel(): void } { + let $resultPromise = $Call.ByID(982947003, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Delete(id: number): Promise & { cancel(): void } { + let $resultPromise = $Call.ByID(3145051352, id) as any; + return $resultPromise; +} + +export function GetAll(): Promise<($models.Workshop | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(806282052) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function GetById(id: number): Promise<$models.Workshop | null> & { cancel(): void } { + let $resultPromise = $Call.ByID(1829452217, id) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType1($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SearchByAllTextFields(phrase: string): Promise<($models.Workshop | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(283835139, phrase) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function SortedByOrder(fieldsSortingOrder: utils$0.SortField[]): Promise<($models.Workshop | null)[]> & { cancel(): void } { + let $resultPromise = $Call.ByID(3581052397, fieldsSortingOrder) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType2($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +export function Update(item: $models.Workshop): Promise<$models.Workshop> & { cancel(): void } { + let $resultPromise = $Call.ByID(1795717546, item) as any; + let $typingPromise = $resultPromise.then(($result: any) => { + return $$createType0($result); + }) as any; + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +// Private type creation functions +const $$createType0 = models$0.Workshop.createFrom; +const $$createType1 = $Create.Nullable($$createType0); +const $$createType2 = $Create.Array($$createType1); diff --git a/frontend/bindings/app/internal/utils/index.ts b/frontend/bindings/app/internal/utils/index.ts new file mode 100644 index 0000000..c9d993a --- /dev/null +++ b/frontend/bindings/app/internal/utils/index.ts @@ -0,0 +1,4 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +export * from "./models.js"; diff --git a/frontend/bindings/app/internal/utils/models.ts b/frontend/bindings/app/internal/utils/models.ts new file mode 100644 index 0000000..612c8a4 --- /dev/null +++ b/frontend/bindings/app/internal/utils/models.ts @@ -0,0 +1,31 @@ +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +export class SortField { + "Name": string; + "Order": string; + + /** Creates a new SortField instance. */ + constructor($$source: Partial = {}) { + if (!("Name" in $$source)) { + this["Name"] = ""; + } + if (!("Order" in $$source)) { + this["Order"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new SortField instance from a string or object. + */ + static createFrom($$source: any = {}): SortField { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new SortField($$parsedSource as Partial); + } +} diff --git a/frontend/src/table/SortingOptions.vue b/frontend/src/table/SortingOptions.vue index 95d7455..d918b27 100644 --- a/frontend/src/table/SortingOptions.vue +++ b/frontend/src/table/SortingOptions.vue @@ -19,10 +19,11 @@ defineProps<{
  • {{ scheme[optionKey].russian }}

    -
  • diff --git a/frontend/src/task/task.service.ts b/frontend/src/task/task.service.ts index bea3705..9a5e5ab 100644 --- a/frontend/src/task/task.service.ts +++ b/frontend/src/task/task.service.ts @@ -43,10 +43,14 @@ export default class TaskService implements IService { async sort(options: SortOptions) { return (await SortedByOrder( - Object.entries(options).map((item) => ({ - Name: item[0], - Order: item[1], - })), + Object.entries(options).map((item) => { + if (item[1] !== 'NONE') { + return ({ + Name: item[0], + Order: item[1], + }) + } + }).filter(item => !!item) )) as Task[]; } } diff --git a/frontend/src/types/sorting.type.ts b/frontend/src/types/sorting.type.ts index 5e37cfa..2373b2c 100644 --- a/frontend/src/types/sorting.type.ts +++ b/frontend/src/types/sorting.type.ts @@ -1 +1 @@ -export type Sorting = "DESC" | "ASC" \ No newline at end of file +export type Sorting = "DESC" | "ASC" | "NONE" \ No newline at end of file diff --git a/frontend/src/utils/structs/default-sort-options.util.ts b/frontend/src/utils/structs/default-sort-options.util.ts index 05a0b3b..596b013 100644 --- a/frontend/src/utils/structs/default-sort-options.util.ts +++ b/frontend/src/utils/structs/default-sort-options.util.ts @@ -8,7 +8,7 @@ export const getDefaultSortOptions = (scheme: Scheme): Sor keys.forEach(key => { if (!scheme[key].hidden && key !== 'entityId' && !scheme[key].many) { - result[key] = 'ASC' + result[key] = 'NONE' } })