@posx/core 5.5.340 → 5.5.351
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +23 -23
- package/LICENSE +21 -21
- package/README.md +85 -85
- package/build/index.d.ts +55 -53
- package/build/index.js +124 -79
- package/jest.config.cjs +36 -36
- package/jest.setup.cjs +80 -80
- package/package.json +1 -1
- package/package.publish.json +120 -120
- package/tsdown.config.ts +18 -18
- package/vite.config.ts +86 -86
package/CLAUDE.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# Claude AI Development Guidelines
|
|
2
|
-
|
|
3
|
-
## Rules you have to follow strictly
|
|
4
|
-
|
|
5
|
-
- You are top-notch programmer who always write simplest code to achieve the ideal result
|
|
6
|
-
- you are one liner engineers and we believe "The Great Tao is Simple", so try to keep changes small and focused
|
|
7
|
-
- keep the changes as minimal as possible
|
|
8
|
-
- if or else has one line of code, then { } are not needed and it should be wrote into same line
|
|
9
|
-
- DO NOT write uncessary comment do not make newlines within a function and try to make the code compact
|
|
10
|
-
- All crucial code should have proper explanation in English
|
|
11
|
-
- Keep the simplifications as small and focused within the function or scope.
|
|
12
|
-
- Do not overhaul the whole file or codebase which is irrelevant to the current task.
|
|
13
|
-
|
|
14
|
-
## Best Practices for AI-Assisted Development
|
|
15
|
-
|
|
16
|
-
1. **在开始编码前先充分讨论和规划架构,确保理解用户的真实需求和使用场景,避免过度设计。**
|
|
17
|
-
|
|
18
|
-
2. **不要急于提交代码,应该等待用户明确指示后再进行 commit 和 push 操作。**
|
|
19
|
-
|
|
20
|
-
3. **优先选择简洁的实现方式(如函数导出而非类),并删除冗余的中间层方法以保持代码清晰。**
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
1
|
+
# Claude AI Development Guidelines
|
|
2
|
+
|
|
3
|
+
## Rules you have to follow strictly
|
|
4
|
+
|
|
5
|
+
- You are top-notch programmer who always write simplest code to achieve the ideal result
|
|
6
|
+
- you are one liner engineers and we believe "The Great Tao is Simple", so try to keep changes small and focused
|
|
7
|
+
- keep the changes as minimal as possible
|
|
8
|
+
- if or else has one line of code, then { } are not needed and it should be wrote into same line
|
|
9
|
+
- DO NOT write uncessary comment do not make newlines within a function and try to make the code compact
|
|
10
|
+
- All crucial code should have proper explanation in English
|
|
11
|
+
- Keep the simplifications as small and focused within the function or scope.
|
|
12
|
+
- Do not overhaul the whole file or codebase which is irrelevant to the current task.
|
|
13
|
+
|
|
14
|
+
## Best Practices for AI-Assisted Development
|
|
15
|
+
|
|
16
|
+
1. **在开始编码前先充分讨论和规划架构,确保理解用户的真实需求和使用场景,避免过度设计。**
|
|
17
|
+
|
|
18
|
+
2. **不要急于提交代码,应该等待用户明确指示后再进行 commit 和 push 操作。**
|
|
19
|
+
|
|
20
|
+
3. **优先选择简洁的实现方式(如函数导出而非类),并删除冗余的中间层方法以保持代码清晰。**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
24
|
*This file contains guidelines learned from AI-human collaboration to improve development efficiency and code quality.*
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Francisco Hodge
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Francisco Hodge
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# 第一阶段
|
|
2
|
-
- 1. 创建,更新,删除都是通过 -> Http API
|
|
3
|
-
- 2. 读取是通过本地数据库 -> 本地, (例外:订单从云端读取)
|
|
4
|
-
|
|
5
|
-
# 第二阶段 (单机版)
|
|
6
|
-
1. 创建,更新,删除,读取都通过本地数据库,然后进行数据和云端同步(Web Worker)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<div align="center">
|
|
19
|
-
<img align="center" width="230" src="https://i.imgur.com/iHgtvmg.png" />
|
|
20
|
-
<h2>Typescript Library Boilerplate Basic</h2>
|
|
21
|
-
<blockquote>Minimal Library Starter Kit for your Typescript projects</blockquote>
|
|
22
|
-
|
|
23
|
-
<a href="https://www.npmjs.com/package/@hodgef/ts-library-boilerplate-basic"><img src="https://badgen.net/npm/v/@hodgef/ts-library-boilerplate-basic?color=blue" alt="npm version"></a> <a href="https://github.com/hodgef/ts-library-boilerplate"><img src="https://img.shields.io/github/last-commit/hodgef/ts-library-boilerplate" alt="latest commit"></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"><img alt="Build Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Build/badge.svg?color=green" /></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"> <img alt="Publish Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Publish/badge.svg?color=green" /></a>
|
|
24
|
-
|
|
25
|
-
<strong>For a plain Javascript alternative, check out [js-library-boilerplate-basic](https://github.com/hodgef/js-library-boilerplate-basic).</strong>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
## ⭐️ Features
|
|
30
|
-
|
|
31
|
-
- Webpack 5
|
|
32
|
-
- Babel 7
|
|
33
|
-
- Hot reloading (`npm start`)
|
|
34
|
-
- Automatic Types file generation (index.d.ts)
|
|
35
|
-
- UMD exports, so your library works everywhere.
|
|
36
|
-
- Jest unit testing
|
|
37
|
-
- Customizable file headers for your build [(Example 1)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/index.js) [(Example2)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/css/index.css)
|
|
38
|
-
- Daily [dependabot](https://dependabot.com) dependency updates
|
|
39
|
-
|
|
40
|
-
## 📦 Getting Started
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
git clone https://github.com/hodgef/ts-library-boilerplate-basic.git myLibrary
|
|
44
|
-
npm install
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## 💎 Customization
|
|
48
|
-
|
|
49
|
-
> Before shipping, make sure to:
|
|
50
|
-
|
|
51
|
-
1. Edit `LICENSE` file
|
|
52
|
-
2. Edit `package.json` information (These will be used to generate the headers for your built files)
|
|
53
|
-
3. Edit `library: "MyLibrary"` with your library's export name in `./webpack.config.js`
|
|
54
|
-
|
|
55
|
-
## 🚀 Deployment
|
|
56
|
-
|
|
57
|
-
1. `npm publish`
|
|
58
|
-
2. Your users can include your library as usual
|
|
59
|
-
|
|
60
|
-
### npm
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
import MyLibrary from 'my-library';
|
|
64
|
-
const libraryInstance = new MyLibrary();
|
|
65
|
-
...
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### self-host/cdn
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
<script src="build/index.js"></script>
|
|
72
|
-
|
|
73
|
-
const MyLibrary = window.MyLibrary.default;
|
|
74
|
-
const libraryInstance = new MyLibrary();
|
|
75
|
-
...
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## ✅ Libraries built with this boilerplate
|
|
79
|
-
|
|
80
|
-
> Made a library using this starter kit? Share it here by [submitting a pull request](https://github.com/hodgef/ts-library-boilerplate-basic/pulls)!
|
|
81
|
-
|
|
82
|
-
- [simple-keyboard](https://github.com/hodgef/simple-keyboard) - Javascript Virtual Keyboard
|
|
83
|
-
- [react-simple-keyboard](https://github.com/hodgef/react-simple-keyboard) - React Virtual Keyboard
|
|
84
|
-
- [simple-keyboard-layouts](https://github.com/hodgef/simple-keyboard-layouts) - Keyboard layouts for simple-keyboard
|
|
85
|
-
- [atlas-monaco](https://github.com/datdao/atlas-monaco) - AtlasHCL for monaco editor
|
|
1
|
+
# 第一阶段
|
|
2
|
+
- 1. 创建,更新,删除都是通过 -> Http API
|
|
3
|
+
- 2. 读取是通过本地数据库 -> 本地, (例外:订单从云端读取)
|
|
4
|
+
|
|
5
|
+
# 第二阶段 (单机版)
|
|
6
|
+
1. 创建,更新,删除,读取都通过本地数据库,然后进行数据和云端同步(Web Worker)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
<img align="center" width="230" src="https://i.imgur.com/iHgtvmg.png" />
|
|
20
|
+
<h2>Typescript Library Boilerplate Basic</h2>
|
|
21
|
+
<blockquote>Minimal Library Starter Kit for your Typescript projects</blockquote>
|
|
22
|
+
|
|
23
|
+
<a href="https://www.npmjs.com/package/@hodgef/ts-library-boilerplate-basic"><img src="https://badgen.net/npm/v/@hodgef/ts-library-boilerplate-basic?color=blue" alt="npm version"></a> <a href="https://github.com/hodgef/ts-library-boilerplate"><img src="https://img.shields.io/github/last-commit/hodgef/ts-library-boilerplate" alt="latest commit"></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"><img alt="Build Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Build/badge.svg?color=green" /></a> <a href="https://github.com/hodgef/ts-library-boilerplate-basic/actions"> <img alt="Publish Status" src="https://github.com/hodgef/ts-library-boilerplate-basic/workflows/Publish/badge.svg?color=green" /></a>
|
|
24
|
+
|
|
25
|
+
<strong>For a plain Javascript alternative, check out [js-library-boilerplate-basic](https://github.com/hodgef/js-library-boilerplate-basic).</strong>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
## ⭐️ Features
|
|
30
|
+
|
|
31
|
+
- Webpack 5
|
|
32
|
+
- Babel 7
|
|
33
|
+
- Hot reloading (`npm start`)
|
|
34
|
+
- Automatic Types file generation (index.d.ts)
|
|
35
|
+
- UMD exports, so your library works everywhere.
|
|
36
|
+
- Jest unit testing
|
|
37
|
+
- Customizable file headers for your build [(Example 1)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/index.js) [(Example2)](https://github.com/hodgef/ts-library-boilerplate-basic/blob/master/build/css/index.css)
|
|
38
|
+
- Daily [dependabot](https://dependabot.com) dependency updates
|
|
39
|
+
|
|
40
|
+
## 📦 Getting Started
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
git clone https://github.com/hodgef/ts-library-boilerplate-basic.git myLibrary
|
|
44
|
+
npm install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 💎 Customization
|
|
48
|
+
|
|
49
|
+
> Before shipping, make sure to:
|
|
50
|
+
|
|
51
|
+
1. Edit `LICENSE` file
|
|
52
|
+
2. Edit `package.json` information (These will be used to generate the headers for your built files)
|
|
53
|
+
3. Edit `library: "MyLibrary"` with your library's export name in `./webpack.config.js`
|
|
54
|
+
|
|
55
|
+
## 🚀 Deployment
|
|
56
|
+
|
|
57
|
+
1. `npm publish`
|
|
58
|
+
2. Your users can include your library as usual
|
|
59
|
+
|
|
60
|
+
### npm
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
import MyLibrary from 'my-library';
|
|
64
|
+
const libraryInstance = new MyLibrary();
|
|
65
|
+
...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### self-host/cdn
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
<script src="build/index.js"></script>
|
|
72
|
+
|
|
73
|
+
const MyLibrary = window.MyLibrary.default;
|
|
74
|
+
const libraryInstance = new MyLibrary();
|
|
75
|
+
...
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## ✅ Libraries built with this boilerplate
|
|
79
|
+
|
|
80
|
+
> Made a library using this starter kit? Share it here by [submitting a pull request](https://github.com/hodgef/ts-library-boilerplate-basic/pulls)!
|
|
81
|
+
|
|
82
|
+
- [simple-keyboard](https://github.com/hodgef/simple-keyboard) - Javascript Virtual Keyboard
|
|
83
|
+
- [react-simple-keyboard](https://github.com/hodgef/react-simple-keyboard) - React Virtual Keyboard
|
|
84
|
+
- [simple-keyboard-layouts](https://github.com/hodgef/simple-keyboard-layouts) - Keyboard layouts for simple-keyboard
|
|
85
|
+
- [atlas-monaco](https://github.com/datdao/atlas-monaco) - AtlasHCL for monaco editor
|
package/build/index.d.ts
CHANGED
|
@@ -3589,10 +3589,11 @@ declare class OrderConfig implements IOrderConfig {
|
|
|
3589
3589
|
constructor();
|
|
3590
3590
|
}
|
|
3591
3591
|
interface IOrderDisplaySystemConfig {
|
|
3592
|
-
|
|
3592
|
+
enabled: boolean;
|
|
3593
3593
|
language: string;
|
|
3594
3594
|
}
|
|
3595
3595
|
declare class OrderDisplaySystemConfig implements IOrderDisplaySystemConfig {
|
|
3596
|
+
enabled: boolean;
|
|
3596
3597
|
language: string;
|
|
3597
3598
|
constructor();
|
|
3598
3599
|
}
|
|
@@ -5005,6 +5006,56 @@ declare class PrinterService extends AppRemoteService<IPrinter> implements IPrin
|
|
|
5005
5006
|
openCashDrawer(): Promise<void>;
|
|
5006
5007
|
}
|
|
5007
5008
|
//#endregion
|
|
5009
|
+
//#region src/types/ods.type.d.ts
|
|
5010
|
+
interface IOrderDisplay extends IAppCoreModel {
|
|
5011
|
+
order_number: string;
|
|
5012
|
+
status: OrderDisplayStatus;
|
|
5013
|
+
}
|
|
5014
|
+
declare class OrderDisplay extends AppCoreModel implements IOrderDisplay {
|
|
5015
|
+
uid: string;
|
|
5016
|
+
order_number: string;
|
|
5017
|
+
status: OrderDisplayStatus;
|
|
5018
|
+
constructor();
|
|
5019
|
+
}
|
|
5020
|
+
declare enum OrderDisplayStatus {
|
|
5021
|
+
Preparing = "preparing",
|
|
5022
|
+
ReadyForPickup = "ready_for_pickup",
|
|
5023
|
+
}
|
|
5024
|
+
//#endregion
|
|
5025
|
+
//#region src/services/ods.service.d.ts
|
|
5026
|
+
/**
|
|
5027
|
+
* Represents the interface for the Order Display Service.
|
|
5028
|
+
* Extends the IAppRemoteService interface with the IOrderDisplay type.
|
|
5029
|
+
*/
|
|
5030
|
+
interface IOrderDisplayService extends IAppRemoteService<IOrderDisplay> {
|
|
5031
|
+
/**
|
|
5032
|
+
* Changes the status of the order to ready for pickup
|
|
5033
|
+
* @param uid The uid of the order
|
|
5034
|
+
* @returns The updated order
|
|
5035
|
+
*/
|
|
5036
|
+
toPickUp(uid: string): Promise<IOrderDisplay>;
|
|
5037
|
+
/**
|
|
5038
|
+
* Changes the status of the order to preparing
|
|
5039
|
+
* @param uid The uid of the order
|
|
5040
|
+
*/
|
|
5041
|
+
toPreparing(uid: string): Promise<IOrderDisplay>;
|
|
5042
|
+
/**
|
|
5043
|
+
* Undoes the last order that was marked as ready for pickup
|
|
5044
|
+
*/
|
|
5045
|
+
undo(): Promise<IOrderDisplay>;
|
|
5046
|
+
}
|
|
5047
|
+
declare class OrderDisplayService extends AppRemoteService<IOrderDisplay> implements IOrderDisplayService {
|
|
5048
|
+
readonly http: AxiosInstance$1;
|
|
5049
|
+
readonly db: Dexie;
|
|
5050
|
+
readonly options: IServiceOptions;
|
|
5051
|
+
readonly moduleName: string;
|
|
5052
|
+
readonly methodName: string;
|
|
5053
|
+
constructor(http: AxiosInstance$1, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
|
|
5054
|
+
toPickUp(uid: string): Promise<IOrderDisplay>;
|
|
5055
|
+
toPreparing(uid: string): Promise<IOrderDisplay>;
|
|
5056
|
+
undo(): Promise<IOrderDisplay>;
|
|
5057
|
+
}
|
|
5058
|
+
//#endregion
|
|
5008
5059
|
//#region src/services/invoice.service.d.ts
|
|
5009
5060
|
interface IInvoiceBaseService extends IAppRemoteService<IInvoice> {
|
|
5010
5061
|
calculate(invoice: IInvoice, appConfig: IAppConfig, disableRounding?: boolean): IInvoice;
|
|
@@ -5032,7 +5083,7 @@ type LineOptions = {
|
|
|
5032
5083
|
remark?: string;
|
|
5033
5084
|
};
|
|
5034
5085
|
declare class InvoiceBaseService extends AppRemoteService<IInvoice> implements IInvoiceBaseService {
|
|
5035
|
-
readonly http: AxiosInstance
|
|
5086
|
+
readonly http: AxiosInstance;
|
|
5036
5087
|
readonly db: Dexie;
|
|
5037
5088
|
readonly options: IServiceOptions;
|
|
5038
5089
|
readonly moduleName: string;
|
|
@@ -5044,7 +5095,8 @@ declare class InvoiceBaseService extends AppRemoteService<IInvoice> implements I
|
|
|
5044
5095
|
protected printerService: PrinterService;
|
|
5045
5096
|
protected printJobService: PrintJobService;
|
|
5046
5097
|
protected itemService: IItemService;
|
|
5047
|
-
|
|
5098
|
+
protected orderDisplayService: OrderDisplayService;
|
|
5099
|
+
constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
|
|
5048
5100
|
calculate(invoice: IInvoice, appConfig: IAppConfig, disableRounding?: boolean): IInvoice;
|
|
5049
5101
|
calculateLines(invoice: IInvoice): void;
|
|
5050
5102
|
calculateLine(line: IInvoiceLine): void;
|
|
@@ -5650,56 +5702,6 @@ declare const filterByParams: (params: {
|
|
|
5650
5702
|
declare function humanizedData(date: Date, format?: string): string;
|
|
5651
5703
|
declare function normalizedDate(date: Date): string;
|
|
5652
5704
|
//#endregion
|
|
5653
|
-
//#region src/types/ods.type.d.ts
|
|
5654
|
-
interface IOrderDisplay extends IAppCoreModel {
|
|
5655
|
-
order_number: string;
|
|
5656
|
-
status: OrderDisplayStatus;
|
|
5657
|
-
}
|
|
5658
|
-
declare class OrderDisplay extends AppCoreModel implements IOrderDisplay {
|
|
5659
|
-
uid: string;
|
|
5660
|
-
order_number: string;
|
|
5661
|
-
status: OrderDisplayStatus;
|
|
5662
|
-
constructor();
|
|
5663
|
-
}
|
|
5664
|
-
declare enum OrderDisplayStatus {
|
|
5665
|
-
Preparing = "preparing",
|
|
5666
|
-
ReadyForPickup = "ready_for_pickup",
|
|
5667
|
-
}
|
|
5668
|
-
//#endregion
|
|
5669
|
-
//#region src/services/ods.service.d.ts
|
|
5670
|
-
/**
|
|
5671
|
-
* Represents the interface for the Order Display Service.
|
|
5672
|
-
* Extends the IAppRemoteService interface with the IOrderDisplay type.
|
|
5673
|
-
*/
|
|
5674
|
-
interface IOrderDisplayService extends IAppRemoteService<IOrderDisplay> {
|
|
5675
|
-
/**
|
|
5676
|
-
* Changes the status of the order to ready for pickup
|
|
5677
|
-
* @param uid The uid of the order
|
|
5678
|
-
* @returns The updated order
|
|
5679
|
-
*/
|
|
5680
|
-
toPickUp(uid: string): Promise<IOrderDisplay>;
|
|
5681
|
-
/**
|
|
5682
|
-
* Changes the status of the order to preparing
|
|
5683
|
-
* @param uid The uid of the order
|
|
5684
|
-
*/
|
|
5685
|
-
toPreparing(uid: string): Promise<IOrderDisplay>;
|
|
5686
|
-
/**
|
|
5687
|
-
* Undoes the last order that was marked as ready for pickup
|
|
5688
|
-
*/
|
|
5689
|
-
undo(): Promise<IOrderDisplay>;
|
|
5690
|
-
}
|
|
5691
|
-
declare class OrderDisplayService extends AppRemoteService<IOrderDisplay> implements IOrderDisplayService {
|
|
5692
|
-
readonly http: AxiosInstance;
|
|
5693
|
-
readonly db: Dexie;
|
|
5694
|
-
readonly options: IServiceOptions;
|
|
5695
|
-
readonly moduleName: string;
|
|
5696
|
-
readonly methodName: string;
|
|
5697
|
-
constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
|
|
5698
|
-
toPickUp(uid: string): Promise<IOrderDisplay>;
|
|
5699
|
-
toPreparing(uid: string): Promise<IOrderDisplay>;
|
|
5700
|
-
undo(): Promise<IOrderDisplay>;
|
|
5701
|
-
}
|
|
5702
|
-
//#endregion
|
|
5703
5705
|
//#region src/types/csv.type.d.ts
|
|
5704
5706
|
/**
|
|
5705
5707
|
* Interface for CSV export rows
|