@pastelarai/pastelarai-shared-types 1.0.113 → 1.0.116
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CONTENTTYPE, STORAGEUNIT, TASKACTIONTYPE, TASKUNIT, UNIT } from "src/data/types";
|
|
1
|
+
import { CONTENTTYPE, STATUS, STORAGEUNIT, TASKACTIONTYPE, TASKUNIT, UNIT } from "src/data/types";
|
|
2
2
|
import { PRODUCTCATEGORY } from "src/data/categories";
|
|
3
3
|
import { IdName } from "./bill";
|
|
4
4
|
import { Avatar, Customer, ProductInRange } from "./ranges";
|
|
5
|
-
import { WorkingRecipe } from "./recipes";
|
|
5
|
+
import { WorkingRecipe, WorkingRecipeContent } from "./recipes";
|
|
6
6
|
export interface Format {
|
|
7
7
|
_id?: string;
|
|
8
8
|
name: string;
|
|
@@ -76,7 +76,7 @@ export interface ScannedProduct {
|
|
|
76
76
|
name: string;
|
|
77
77
|
category: PRODUCTCATEGORY;
|
|
78
78
|
description: string;
|
|
79
|
-
|
|
79
|
+
content_list: WorkingRecipeContent[];
|
|
80
80
|
recipes: WorkingRecipe[];
|
|
81
81
|
}
|
|
82
82
|
export interface IdNameAvatar extends IdName {
|
|
@@ -108,3 +108,41 @@ export interface TaskProduct {
|
|
|
108
108
|
unit: UNIT;
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
+
export interface WorkingFormat extends Format {
|
|
112
|
+
category?: PRODUCTCATEGORY;
|
|
113
|
+
creationMode?: "CUS" | "GLO";
|
|
114
|
+
status?: STATUS;
|
|
115
|
+
isValid?: boolean;
|
|
116
|
+
errors?: {
|
|
117
|
+
type: boolean;
|
|
118
|
+
nb_pers: boolean;
|
|
119
|
+
size: boolean;
|
|
120
|
+
type_sale: boolean;
|
|
121
|
+
duplicate: boolean;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export interface WorkingCompositionBase extends Omit<CompositionBase, 'format' | 'content_list'> {
|
|
125
|
+
format: WorkingFormat;
|
|
126
|
+
selected?: boolean;
|
|
127
|
+
content_list: WorkingRecipeContent[];
|
|
128
|
+
}
|
|
129
|
+
export type WorkingComposition = WorkingCompositionBase & {
|
|
130
|
+
[key in PricingType]?: Pricing;
|
|
131
|
+
};
|
|
132
|
+
export interface WorkingProduct {
|
|
133
|
+
name: string;
|
|
134
|
+
category: PRODUCTCATEGORY;
|
|
135
|
+
holidays: string;
|
|
136
|
+
storage: {
|
|
137
|
+
unit: STORAGEUNIT;
|
|
138
|
+
value: number;
|
|
139
|
+
};
|
|
140
|
+
stock: number;
|
|
141
|
+
description: string;
|
|
142
|
+
base_format: string;
|
|
143
|
+
composition: WorkingComposition[];
|
|
144
|
+
_id?: string;
|
|
145
|
+
using?: {
|
|
146
|
+
ranges_list: IdNameAvatar[];
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -5,10 +5,10 @@ export interface RecipeContent {
|
|
|
5
5
|
_id?: string;
|
|
6
6
|
name: string;
|
|
7
7
|
weight: number;
|
|
8
|
-
cost: number;
|
|
9
8
|
quantity?: number;
|
|
10
|
-
|
|
9
|
+
cost: number;
|
|
11
10
|
type: CONTENTTYPE;
|
|
11
|
+
unit: UNIT;
|
|
12
12
|
}
|
|
13
13
|
export interface LaminatedDough {
|
|
14
14
|
weight_unit_dough: number;
|