@ercioko/meblotex-api 0.2.2 → 0.2.3
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/dist/api/Api.d.ts +33 -0
- package/dist/api/Api.js +152 -0
- package/dist/api/Endpoint.d.ts +13 -0
- package/dist/api/Endpoint.js +126 -0
- package/dist/api/createApi.d.ts +52 -0
- package/dist/api/createApi.js +81 -0
- package/dist/api/error.d.ts +15 -0
- package/dist/api/error.js +18 -0
- package/{src/api/index.ts → dist/api/index.d.ts} +0 -1
- package/dist/api/index.js +34 -0
- package/dist/api/status.d.ts +3 -0
- package/dist/api/status.js +6 -0
- package/dist/api/utils/getAlert.d.ts +6 -0
- package/dist/api/utils/getAlert.js +65 -0
- package/dist/api/utils/index.js +8 -0
- package/dist/app_types.d.ts +607 -0
- package/dist/app_types.js +75 -0
- package/dist/components/ApiHostProvider.d.ts +7 -0
- package/dist/components/ApiHostProvider.js +35 -0
- package/dist/components/StatusTag.d.ts +11 -0
- package/dist/components/StatusTag.js +86 -0
- package/dist/components/Table/DataTableWrapper.d.ts +3 -0
- package/dist/components/Table/DataTableWrapper.js +44 -0
- package/dist/components/Table/FloatingActions.d.ts +14 -0
- package/dist/components/Table/FloatingActions.js +32 -0
- package/dist/components/Table/Spinner.d.ts +2 -0
- package/dist/components/Table/Spinner.js +26 -0
- package/dist/components/Table/Table.d.ts +28 -0
- package/dist/components/Table/Table.js +330 -0
- package/dist/components/Table/addIndexToObject.d.ts +3 -0
- package/dist/components/Table/addIndexToObject.js +17 -0
- package/dist/components/Table/areProvidedColumnsDifferent.d.ts +2 -0
- package/dist/components/Table/areProvidedColumnsDifferent.js +16 -0
- package/dist/components/Table/hooks/useFetchPage.d.ts +18 -0
- package/dist/components/Table/hooks/useFetchPage.js +123 -0
- package/dist/components/Table/hooks/useGetCellRenderer.d.ts +25 -0
- package/dist/components/Table/hooks/useGetCellRenderer.js +166 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.js +53 -0
- package/dist/components/Table/hooks/useGetDeleteRow.d.ts +9 -0
- package/dist/components/Table/hooks/useGetDeleteRow.js +74 -0
- package/dist/components/Table/hooks/useGetResizeColumn.d.ts +8 -0
- package/dist/components/Table/hooks/useGetResizeColumn.js +28 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.js +54 -0
- package/dist/components/Table/hooks/useLoadDataSource.d.ts +10 -0
- package/dist/components/Table/hooks/useLoadDataSource.js +20 -0
- package/dist/components/Table/hooks/usePageSize.d.ts +5 -0
- package/dist/components/Table/hooks/usePageSize.js +16 -0
- package/dist/components/Table/hooks/useRenderRowActions.d.ts +6 -0
- package/dist/components/Table/hooks/useRenderRowActions.js +51 -0
- package/dist/components/Table/hooks/useResizeColumns.d.ts +9 -0
- package/dist/components/Table/hooks/useResizeColumns.js +60 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +8 -0
- package/dist/components/Table/providers/OrderProvider.d.ts +9 -0
- package/dist/components/Table/providers/OrderProvider.js +17 -0
- package/dist/components/Table/styles.d.ts +6 -0
- package/dist/components/Table/styles.js +37 -0
- package/dist/components/index.js +26 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +8 -0
- package/dist/db_types.d.ts +208 -0
- package/dist/db_types.js +2 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/useApi.d.ts +2 -0
- package/dist/hooks/useApi.js +42 -0
- package/dist/hooks/useEndpoint.d.ts +2 -0
- package/dist/hooks/useEndpoint.js +34 -0
- package/dist/index.js +19 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/jednostkaNazwa.d.ts +6 -0
- package/dist/lib/jednostkaNazwa.js +9 -0
- package/dist/lib/typDokumentuNazwa.d.ts +6 -0
- package/dist/lib/typDokumentuNazwa.js +11 -0
- package/dist/src/api/Api.js +316 -0
- package/dist/src/api/Endpoint.js +365 -0
- package/dist/src/api/createApi.js +50 -0
- package/dist/src/api/error.js +15 -0
- package/dist/src/api/index.js +5 -0
- package/dist/src/api/status.js +3 -0
- package/dist/src/api/utils/getAlert.js +63 -0
- package/dist/src/api/utils/index.js +1 -0
- package/dist/src/app_types.js +72 -0
- package/dist/src/components/ApiHostProvider.js +11 -0
- package/dist/src/components/StatusTag.js +153 -0
- package/dist/src/components/Table/DataTableWrapper.js +115 -0
- package/dist/src/components/Table/FloatingActions.js +60 -0
- package/dist/src/components/Table/Spinner.js +40 -0
- package/dist/src/components/Table/Summary.js +16 -0
- package/dist/src/components/Table/Table.js +498 -0
- package/dist/src/components/Table/addIndexToObject.js +57 -0
- package/dist/src/components/Table/areProvidedColumnsDifferent.js +19 -0
- package/dist/src/components/Table/clicked.js +12 -0
- package/dist/src/components/Table/displayActions.js +11 -0
- package/dist/src/components/Table/hooks/useFetchPage.js +254 -0
- package/dist/src/components/Table/hooks/useGetCellRenderer.js +231 -0
- package/dist/src/components/Table/hooks/useGetColumnsWithCheckbox.js +33 -0
- package/dist/src/components/Table/hooks/useGetDeleteRow.js +181 -0
- package/dist/src/components/Table/hooks/useGetResizeColumn.js +72 -0
- package/dist/src/components/Table/hooks/useGetRowCheckbox.js +55 -0
- package/dist/src/components/Table/hooks/useLoadDataSource.js +16 -0
- package/dist/src/components/Table/hooks/usePageSize.js +15 -0
- package/dist/src/components/Table/hooks/useRenderRowActions.js +50 -0
- package/dist/src/components/Table/hooks/useResizeColumns.js +70 -0
- package/dist/src/components/Table/index.js +1 -0
- package/dist/src/components/Table/providers/OrderProvider.js +65 -0
- package/dist/src/components/Table/styles.js +66 -0
- package/dist/src/components/index.js +4 -0
- package/dist/src/config.js +6 -0
- package/dist/src/db_types.js +1 -0
- package/dist/src/hooks/index.js +2 -0
- package/dist/src/hooks/useApi.js +84 -0
- package/dist/src/hooks/useEndpoint.js +60 -0
- package/dist/src/index.js +3 -0
- package/dist/src/lib/index.js +2 -0
- package/dist/src/lib/jednostkaNazwa.js +6 -0
- package/dist/src/lib/typDokumentuNazwa.js +16 -0
- package/dist/src/utils/Query.js +73 -0
- package/dist/src/utils/getWZNumber.js +4 -0
- package/dist/src/utils/getZamowienieDokumentNumber.js +4 -0
- package/{src/utils/index.ts → dist/src/utils/index.js} +2 -2
- package/dist/utils/Query.d.ts +6 -0
- package/dist/utils/Query.js +33 -0
- package/dist/utils/getWZNumber.d.ts +2 -0
- package/dist/utils/getWZNumber.js +10 -0
- package/dist/utils/getZamowienieDokumentNumber.d.ts +2 -0
- package/dist/utils/getZamowienieDokumentNumber.js +8 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +12 -0
- package/package.json +3 -2
- package/.eslintrc +0 -6
- package/.nvmrc +0 -1
- package/.prettierrc +0 -11
- package/src/api/Api.ts +0 -140
- package/src/api/Endpoint.ts +0 -76
- package/src/api/createApi.ts +0 -116
- package/src/api/error.ts +0 -17
- package/src/api/status.ts +0 -3
- package/src/api/utils/getAlert.ts +0 -75
- package/src/app_types.ts +0 -695
- package/src/components/ApiHostProvider.tsx +0 -13
- package/src/components/StatusTag.tsx +0 -83
- package/src/components/Table/DataTableWrapper.tsx +0 -28
- package/src/components/Table/FloatingActions.tsx +0 -152
- package/src/components/Table/Spinner.tsx +0 -35
- package/src/components/Table/Summary.tsx +0 -18
- package/src/components/Table/Table.tsx +0 -474
- package/src/components/Table/addIndexToObject.ts +0 -6
- package/src/components/Table/areProvidedColumnsDifferent.ts +0 -26
- package/src/components/Table/clicked.js +0 -12
- package/src/components/Table/displayActions.tsx +0 -19
- package/src/components/Table/hooks/useFetchPage.tsx +0 -83
- package/src/components/Table/hooks/useGetCellRenderer.tsx +0 -197
- package/src/components/Table/hooks/useGetColumnsWithCheckbox.tsx +0 -34
- package/src/components/Table/hooks/useGetDeleteRow.tsx +0 -37
- package/src/components/Table/hooks/useGetResizeColumn.ts +0 -33
- package/src/components/Table/hooks/useGetRowCheckbox.tsx +0 -25
- package/src/components/Table/hooks/useLoadDataSource.ts +0 -24
- package/src/components/Table/hooks/usePageSize.tsx +0 -20
- package/src/components/Table/hooks/useRenderRowActions.tsx +0 -45
- package/src/components/Table/hooks/useResizeColumns.ts +0 -61
- package/src/components/Table/index.ts +0 -1
- package/src/components/Table/providers/OrderProvider.tsx +0 -20
- package/src/components/Table/styles.ts +0 -208
- package/src/config.ts +0 -7
- package/src/db_types.ts +0 -220
- package/src/hooks/useApi.ts +0 -43
- package/src/hooks/useEndpoint.ts +0 -35
- package/src/lib/jednostkaNazwa.ts +0 -6
- package/src/lib/typDokumentuNazwa.ts +0 -8
- package/src/utils/Query.ts +0 -30
- package/src/utils/getWZNumber.ts +0 -13
- package/src/utils/getZamowienieDokumentNumber.ts +0 -11
- package/tsconfig.json +0 -25
- package/tsconfig.tsbuildinfo +0 -1
- /package/{src/api/utils/index.ts → dist/api/utils/index.d.ts} +0 -0
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/hooks/index.ts → dist/hooks/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/lib/index.ts → dist/lib/index.d.ts} +0 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
import { UzytkownikAttributes, WplataAttributes, ZamowienieDokumentAttributes, ZamowienieDokumentMagazynAttributes } from './db_types';
|
|
2
|
+
type PrefixKeys<T, Prefix extends string> = {
|
|
3
|
+
[K in keyof T as `${Prefix}.${string & K}`]: T[K];
|
|
4
|
+
};
|
|
5
|
+
export interface TowarKategoria {
|
|
6
|
+
id_towar_kategoria: number;
|
|
7
|
+
nazwa: string;
|
|
8
|
+
opis: string;
|
|
9
|
+
kolejnosc: number;
|
|
10
|
+
portal: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type NoweZamowienieTowarKategoria = TowarKategoria & {
|
|
13
|
+
id_cecha_pre1: number;
|
|
14
|
+
id_cecha_pre2: number;
|
|
15
|
+
id_cecha_pre3: number;
|
|
16
|
+
id_cecha_pre4: number;
|
|
17
|
+
cecha_predefiniowana1_nazwa: string;
|
|
18
|
+
cecha_predefiniowana2_nazwa: string;
|
|
19
|
+
cecha_predefiniowana3_nazwa: string;
|
|
20
|
+
cecha_predefiniowana4_nazwa: string;
|
|
21
|
+
};
|
|
22
|
+
export interface NoweZamowienieCechaWartosc {
|
|
23
|
+
id_cecha_wartosc: number;
|
|
24
|
+
wartosc_opis: string;
|
|
25
|
+
wartosc: string;
|
|
26
|
+
nazwa_zasob: string;
|
|
27
|
+
'cecha.id_cecha_wartosc_domyslna': number;
|
|
28
|
+
}
|
|
29
|
+
export type NoweZamowienieTowar = Towar & {
|
|
30
|
+
kategoria_nazwa: string;
|
|
31
|
+
};
|
|
32
|
+
export interface ZamowienieElement {
|
|
33
|
+
nazwa: string;
|
|
34
|
+
towar_kategoria: string;
|
|
35
|
+
sztuk: number;
|
|
36
|
+
metry: number;
|
|
37
|
+
metry_kw: number;
|
|
38
|
+
jednostka: number;
|
|
39
|
+
cena_jednostka: number;
|
|
40
|
+
cena: number;
|
|
41
|
+
podatek: number;
|
|
42
|
+
rabat_cena: number;
|
|
43
|
+
rabat_prefix: string;
|
|
44
|
+
rabat_sufix: string;
|
|
45
|
+
etykieta: boolean;
|
|
46
|
+
id_atrybut_konfig_grupa?: number;
|
|
47
|
+
id_zamowienie_element_parent?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface Towar {
|
|
50
|
+
id_towar: number;
|
|
51
|
+
nazwa: string;
|
|
52
|
+
typ: string;
|
|
53
|
+
podatek: number;
|
|
54
|
+
portal: boolean;
|
|
55
|
+
opis: string;
|
|
56
|
+
kolejnosc: number;
|
|
57
|
+
etykieta: boolean;
|
|
58
|
+
id_rownanie_grupa: number;
|
|
59
|
+
id_atrybut_konfig_grupa: number;
|
|
60
|
+
}
|
|
61
|
+
export interface TowarAtrybut {
|
|
62
|
+
id_towar_atrybut: number;
|
|
63
|
+
relacja: string;
|
|
64
|
+
}
|
|
65
|
+
export type TowarAtrybutResponseElement = {
|
|
66
|
+
wartosc_opis: string;
|
|
67
|
+
wartosc: string;
|
|
68
|
+
wartosc_rownanie: number;
|
|
69
|
+
nazwa_zasobu: string;
|
|
70
|
+
id_cecha: number;
|
|
71
|
+
id_atrybut: number;
|
|
72
|
+
id_cecha_wartosc: number;
|
|
73
|
+
wartosc_min: number;
|
|
74
|
+
wartosc_max: number;
|
|
75
|
+
id_rownanie_zmienna: number;
|
|
76
|
+
narzut_cena: number;
|
|
77
|
+
narzut_prefix: string;
|
|
78
|
+
narzut_sufix: string;
|
|
79
|
+
domyslna: boolean;
|
|
80
|
+
cecha_nazwa: string;
|
|
81
|
+
id_cecha_kategoria: number;
|
|
82
|
+
cecha_typ: string;
|
|
83
|
+
cecha_kontrolka: string;
|
|
84
|
+
cecha_sort: number;
|
|
85
|
+
relacja: string;
|
|
86
|
+
parent: number;
|
|
87
|
+
pre: boolean;
|
|
88
|
+
id_rownanie_zmienna_kategoria: number;
|
|
89
|
+
};
|
|
90
|
+
export type TowarAtrybutResponse = TowarAtrybutResponseElement[];
|
|
91
|
+
export type TowarAtrybut2ResponseElement = {
|
|
92
|
+
id_towar: number;
|
|
93
|
+
relacja: string;
|
|
94
|
+
id_atrybut: number;
|
|
95
|
+
};
|
|
96
|
+
export type TowarAtrybut2Response = TowarAtrybut2ResponseElement[];
|
|
97
|
+
export type TowarAtrybutRoot = TowarAtrybutResponseElement & {
|
|
98
|
+
features?: TowarAtrybutRoots;
|
|
99
|
+
children?: TowarAtrybutRoots;
|
|
100
|
+
};
|
|
101
|
+
export type TowarAtrybutRoots = TowarAtrybutRoot[];
|
|
102
|
+
export type UseFeatureValues = {
|
|
103
|
+
cecha_predefiniowana1: NoweZamowienieCechaWartosc[];
|
|
104
|
+
cecha_predefiniowana2: NoweZamowienieCechaWartosc[];
|
|
105
|
+
cecha_predefiniowana3: NoweZamowienieCechaWartosc[];
|
|
106
|
+
cecha_predefiniowana4: NoweZamowienieCechaWartosc[];
|
|
107
|
+
};
|
|
108
|
+
export type FeatureValues = {
|
|
109
|
+
cecha_wartosc1: NoweZamowienieCechaWartosc;
|
|
110
|
+
cecha_wartosc2: NoweZamowienieCechaWartosc;
|
|
111
|
+
cecha_wartosc3: NoweZamowienieCechaWartosc;
|
|
112
|
+
cecha_wartosc4: NoweZamowienieCechaWartosc;
|
|
113
|
+
};
|
|
114
|
+
export interface ZamowienieElementAtrybut {
|
|
115
|
+
cecha: string;
|
|
116
|
+
cecha_typ: string;
|
|
117
|
+
wartosc_opis: string;
|
|
118
|
+
wartosc: string;
|
|
119
|
+
wartosc_rownanie: number;
|
|
120
|
+
narzut_cena: number;
|
|
121
|
+
narzut_prefix: string;
|
|
122
|
+
narzut_sufix: string;
|
|
123
|
+
nazwa_zasob: string;
|
|
124
|
+
predef: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface Bufor {
|
|
127
|
+
id_bufor?: number;
|
|
128
|
+
data_bufor: Date;
|
|
129
|
+
data_realizacji?: Date;
|
|
130
|
+
bufor_typ: string;
|
|
131
|
+
bufor_metoda: string;
|
|
132
|
+
bufor_status: BuforStatus;
|
|
133
|
+
numer_obcy: string;
|
|
134
|
+
sztuk: number;
|
|
135
|
+
metry: number;
|
|
136
|
+
metry_kw: number;
|
|
137
|
+
wartosc: number;
|
|
138
|
+
plik_sciezka?: string;
|
|
139
|
+
uwagi: string;
|
|
140
|
+
id_klient: number;
|
|
141
|
+
id_uzytkownik_dodanie: number;
|
|
142
|
+
id_cecha_wartosc_pre1?: number;
|
|
143
|
+
id_cecha_wartosc_pre2?: number;
|
|
144
|
+
id_cecha_wartosc_pre3?: number;
|
|
145
|
+
id_cecha_wartosc_pre4?: number;
|
|
146
|
+
id_towar_kategoria: number;
|
|
147
|
+
}
|
|
148
|
+
export interface BuforElement {
|
|
149
|
+
id_bufor_element?: number;
|
|
150
|
+
zrodlo: Zrodlo;
|
|
151
|
+
nazwa: string;
|
|
152
|
+
towar_typ: string;
|
|
153
|
+
towar_kategoria: string;
|
|
154
|
+
sztuk: number;
|
|
155
|
+
metry: number;
|
|
156
|
+
metry_kw: number;
|
|
157
|
+
jednostka: number;
|
|
158
|
+
cena_jednostka: number;
|
|
159
|
+
cena: number;
|
|
160
|
+
podatek: number;
|
|
161
|
+
rabat_cena: number;
|
|
162
|
+
rabat_prefix: string;
|
|
163
|
+
rabat_sufix: string;
|
|
164
|
+
kolejnosc: number;
|
|
165
|
+
etykieta: boolean;
|
|
166
|
+
id_uzytkownik_dodanie?: number;
|
|
167
|
+
id_uzytkownik_edycja?: number;
|
|
168
|
+
id_rownanie_grupa?: number;
|
|
169
|
+
id_atrybut_konfig_grupa: number;
|
|
170
|
+
id_bufor_element_parent?: number;
|
|
171
|
+
}
|
|
172
|
+
export type Zamowienie = {
|
|
173
|
+
id_zamowienie: number;
|
|
174
|
+
data_przyjecia: Date;
|
|
175
|
+
data_realizacji: Date;
|
|
176
|
+
data_status: Date;
|
|
177
|
+
zamowienie_status: string;
|
|
178
|
+
zamowienie_typ: string;
|
|
179
|
+
zamowienie_metoda: string;
|
|
180
|
+
numer: number;
|
|
181
|
+
numer_idx: number;
|
|
182
|
+
numer_obcy: string;
|
|
183
|
+
sztuk: number;
|
|
184
|
+
metry: number;
|
|
185
|
+
metry_kw: number;
|
|
186
|
+
wartosc: number;
|
|
187
|
+
paczki: number;
|
|
188
|
+
plik_sciezka: string;
|
|
189
|
+
uwagi: string;
|
|
190
|
+
portal_archiwum: boolean;
|
|
191
|
+
numer_konsumenta: string;
|
|
192
|
+
numer_txt: string;
|
|
193
|
+
id_klient: number;
|
|
194
|
+
klient: Klient;
|
|
195
|
+
id_zamowienie_dokument: number;
|
|
196
|
+
zamowienie_dokument: ZamowienieDokument;
|
|
197
|
+
uzytkownik_dodanie: Uzytkownik;
|
|
198
|
+
} & PrefixKeys<ZamowienieDokument, 'zamowienie_dokument'>;
|
|
199
|
+
export interface KlientKategoria {
|
|
200
|
+
id_klient_kategoria: number;
|
|
201
|
+
nazwa: string;
|
|
202
|
+
opis?: string;
|
|
203
|
+
czas_dodanie?: Date;
|
|
204
|
+
czas_edycja?: Date;
|
|
205
|
+
}
|
|
206
|
+
export interface ZamowienieFilters {
|
|
207
|
+
metoda?: string;
|
|
208
|
+
status?: string;
|
|
209
|
+
data_przyjecia: [string, string];
|
|
210
|
+
data_realizacji?: [string, string];
|
|
211
|
+
data_status?: [string, string];
|
|
212
|
+
numer?: string;
|
|
213
|
+
numer_obcy?: string;
|
|
214
|
+
}
|
|
215
|
+
export interface BuforElementAtrybut {
|
|
216
|
+
id_bufor_element_atrybut?: number;
|
|
217
|
+
cecha: string;
|
|
218
|
+
cecha_typ: string;
|
|
219
|
+
wartosc_opis: string;
|
|
220
|
+
wartosc: string;
|
|
221
|
+
wartosc_rownanie: number;
|
|
222
|
+
narzut_cena?: number;
|
|
223
|
+
narzut_prefix?: string;
|
|
224
|
+
narzut_sufix?: string;
|
|
225
|
+
nazwa_zasob: string;
|
|
226
|
+
predef: boolean;
|
|
227
|
+
id_bufor_element?: number;
|
|
228
|
+
id_uzytkownik_dodanie?: number;
|
|
229
|
+
id_uzytkownik_edycja?: number;
|
|
230
|
+
id_rownanie_zmienna: number;
|
|
231
|
+
}
|
|
232
|
+
export type BuforElementWithProperties = BuforElement & {
|
|
233
|
+
properties: BuforElementAtrybut[];
|
|
234
|
+
};
|
|
235
|
+
export declare enum Zrodlo {
|
|
236
|
+
Web = "M",
|
|
237
|
+
Producent = "P"
|
|
238
|
+
}
|
|
239
|
+
export declare enum Jednostka {
|
|
240
|
+
m2 = 3,
|
|
241
|
+
systemowy,
|
|
242
|
+
szt = 1,
|
|
243
|
+
m2old = -2
|
|
244
|
+
}
|
|
245
|
+
export declare enum RabatPrefix {
|
|
246
|
+
Brak = "N",// TODO
|
|
247
|
+
Narzut = "P",
|
|
248
|
+
Rabat = "M"
|
|
249
|
+
}
|
|
250
|
+
export declare enum RabatSufix {
|
|
251
|
+
Procent = "%",
|
|
252
|
+
Brak = ""
|
|
253
|
+
}
|
|
254
|
+
export type DataRow = Record<string, unknown> & {
|
|
255
|
+
id: number;
|
|
256
|
+
};
|
|
257
|
+
export type Order = [string, string] | [string, string, string];
|
|
258
|
+
export type loadPage<DataType = DataRow> = (page: number, size: number, filters?: Record<string, unknown> | undefined, order?: Order | undefined) => Promise<{
|
|
259
|
+
data: DataType[];
|
|
260
|
+
total: number;
|
|
261
|
+
}>;
|
|
262
|
+
export type TableColumnKey<T> = keyof T | 'index' | 'akcje' | 'checkbox';
|
|
263
|
+
export type TableColumn<T, K extends TableColumnKey<T> = TableColumnKey<T>> = {
|
|
264
|
+
align?: 'right';
|
|
265
|
+
modified?: boolean;
|
|
266
|
+
resized?: boolean;
|
|
267
|
+
width: number;
|
|
268
|
+
title: JSX.Element | string;
|
|
269
|
+
key: K;
|
|
270
|
+
render?: (_v: K extends keyof T ? T[K] : number, _row: T, index?: number) => JSX.Element | string;
|
|
271
|
+
lightRender?: (_v: K extends keyof T ? T[K] : number, _row: T, index?: number) => JSX.Element | string;
|
|
272
|
+
orderNested?: [string, string];
|
|
273
|
+
};
|
|
274
|
+
export type ActionFunction<DataType = DataRow> = (row: DataType) => JSX.Element;
|
|
275
|
+
export type Actions<DataType = DataRow> = {
|
|
276
|
+
both?: boolean;
|
|
277
|
+
buttons?: ActionFunction<DataType>[];
|
|
278
|
+
delete?: boolean;
|
|
279
|
+
width?: number;
|
|
280
|
+
onRowClick?: (row: DataType) => void;
|
|
281
|
+
floatingOnly?: ActionFunction<DataType>[];
|
|
282
|
+
additionalWidth?: number;
|
|
283
|
+
tooltips?: string[];
|
|
284
|
+
};
|
|
285
|
+
export declare enum BuforStatus {
|
|
286
|
+
False = "F",
|
|
287
|
+
New = "N",
|
|
288
|
+
Bufor = "B"
|
|
289
|
+
}
|
|
290
|
+
export interface RownanieZmienna {
|
|
291
|
+
id_rownanie_zmienna: number;
|
|
292
|
+
id_rownanie_zmienna_kategoria: number;
|
|
293
|
+
nazwa: string;
|
|
294
|
+
nazwa_opis: string;
|
|
295
|
+
kolejnosc: number;
|
|
296
|
+
opis: string;
|
|
297
|
+
czas_dodanie?: Date;
|
|
298
|
+
czas_edycja?: Date;
|
|
299
|
+
}
|
|
300
|
+
export interface Rownanie {
|
|
301
|
+
id_rownanie: number;
|
|
302
|
+
formula: string;
|
|
303
|
+
typ: string;
|
|
304
|
+
opis: string;
|
|
305
|
+
id_rownanie_grupa?: number;
|
|
306
|
+
}
|
|
307
|
+
export interface AtrybutKonfig {
|
|
308
|
+
id_atrybut_konfig?: number;
|
|
309
|
+
wartosc: string;
|
|
310
|
+
id_atrybut_konfig_grupa?: number;
|
|
311
|
+
id_cecha?: number;
|
|
312
|
+
id_rownanie_zmienna?: number;
|
|
313
|
+
id_uzytkownik_dodanie?: number;
|
|
314
|
+
id_uzytkownik_edycja?: number;
|
|
315
|
+
}
|
|
316
|
+
export type NoweZamowienieAtrybutKonfigResponse = {
|
|
317
|
+
id_cecha: number;
|
|
318
|
+
nazwa: string;
|
|
319
|
+
typ: string;
|
|
320
|
+
wartosc: string;
|
|
321
|
+
id_rownanie_zmienna: number;
|
|
322
|
+
zmienna_nazwa: string;
|
|
323
|
+
id_rownanie_zmienna_kategoria: number;
|
|
324
|
+
};
|
|
325
|
+
export declare enum CechaKontrolka {
|
|
326
|
+
PC_EDIT = "pcEdit ",
|
|
327
|
+
PC_CBX = "pcCbx ",
|
|
328
|
+
PC_HIDE = "pcHide ",
|
|
329
|
+
PT_BOOL = "ptBool "
|
|
330
|
+
}
|
|
331
|
+
export declare enum CechaTyp {
|
|
332
|
+
PT_INT = "ptInt ",
|
|
333
|
+
PT_TXT = "ptTxt "
|
|
334
|
+
}
|
|
335
|
+
export declare enum RownanieTyp {
|
|
336
|
+
Kalkulacja = "K"
|
|
337
|
+
}
|
|
338
|
+
export interface RownanieZmiennaKategoria {
|
|
339
|
+
id_rownanie_zmienna_kategoria: number;
|
|
340
|
+
nazwa: string;
|
|
341
|
+
opis: string;
|
|
342
|
+
czas_dodanie?: Date;
|
|
343
|
+
czas_edycja?: Date;
|
|
344
|
+
}
|
|
345
|
+
export interface KlientRabat {
|
|
346
|
+
id_klient_rabat: number;
|
|
347
|
+
rabat: number;
|
|
348
|
+
rabat_prefix: string;
|
|
349
|
+
rabat_portal: number;
|
|
350
|
+
rabat_portal_prefix: string;
|
|
351
|
+
id_uzytkownik_dodanie?: number;
|
|
352
|
+
id_uzytkownik_edycja?: number;
|
|
353
|
+
id_towar_kategoria?: number;
|
|
354
|
+
id_klient?: number;
|
|
355
|
+
}
|
|
356
|
+
export type KlientZamowienie = {
|
|
357
|
+
id_record: number;
|
|
358
|
+
id_klient: number;
|
|
359
|
+
data_przyjecia: Date;
|
|
360
|
+
data_realizacji: Date;
|
|
361
|
+
data_status: Date;
|
|
362
|
+
status: string;
|
|
363
|
+
typ: string;
|
|
364
|
+
numer: number;
|
|
365
|
+
numer_obcy: string;
|
|
366
|
+
sztuk: number;
|
|
367
|
+
metry: number;
|
|
368
|
+
metry_kw: number;
|
|
369
|
+
wartosc: number;
|
|
370
|
+
plik_sciezka: string;
|
|
371
|
+
metoda: string;
|
|
372
|
+
numer_idx: number;
|
|
373
|
+
nazwa_skrocona: string;
|
|
374
|
+
vip: boolean;
|
|
375
|
+
id_zamowienie_wydanie: number;
|
|
376
|
+
bufor: boolean;
|
|
377
|
+
kategoria_pre: string;
|
|
378
|
+
kolor: string;
|
|
379
|
+
wzor: string;
|
|
380
|
+
data_bufor: Date;
|
|
381
|
+
};
|
|
382
|
+
export type Klient = {
|
|
383
|
+
id_klient: number;
|
|
384
|
+
nazwa_skrocona: string;
|
|
385
|
+
nazwa1: string;
|
|
386
|
+
nazwa2: string;
|
|
387
|
+
nazwa3: string;
|
|
388
|
+
kraj: string;
|
|
389
|
+
miasto: string;
|
|
390
|
+
wojewodztwo: string;
|
|
391
|
+
ulica: string;
|
|
392
|
+
numer_domu: string;
|
|
393
|
+
numer_lokalu: string;
|
|
394
|
+
ulica_txt: string;
|
|
395
|
+
kod: string;
|
|
396
|
+
poczta: string;
|
|
397
|
+
nip_kraj: string;
|
|
398
|
+
nip: string;
|
|
399
|
+
vip: boolean;
|
|
400
|
+
platnik_vat: boolean;
|
|
401
|
+
regon: string;
|
|
402
|
+
pesel: string;
|
|
403
|
+
telefon1: string;
|
|
404
|
+
telefon2: string;
|
|
405
|
+
fax: string;
|
|
406
|
+
email: string;
|
|
407
|
+
www: string;
|
|
408
|
+
uwagi: string;
|
|
409
|
+
frontman: boolean;
|
|
410
|
+
frontman_login: string;
|
|
411
|
+
frontman_haslo: string;
|
|
412
|
+
frontman_data_login: Date | number;
|
|
413
|
+
frontman_data_logout: Date | number;
|
|
414
|
+
portal: boolean;
|
|
415
|
+
portal_login: string;
|
|
416
|
+
portal_haslo: string;
|
|
417
|
+
};
|
|
418
|
+
export type State = {
|
|
419
|
+
bufor_element_atrybut: (BuforElementAtrybut & {
|
|
420
|
+
id_cecha_wartosc?: number;
|
|
421
|
+
parent?: number;
|
|
422
|
+
})[];
|
|
423
|
+
error: string | undefined;
|
|
424
|
+
klient: Klient;
|
|
425
|
+
klient_rabat: KlientRabat[];
|
|
426
|
+
menuCollapsed: boolean;
|
|
427
|
+
rownanie_zmienna: RownanieZmienna[];
|
|
428
|
+
searchBarCollapsed: boolean;
|
|
429
|
+
token: string | undefined;
|
|
430
|
+
};
|
|
431
|
+
export type Uzytkownik = UzytkownikAttributes;
|
|
432
|
+
export type Wplata = WplataAttributes & {
|
|
433
|
+
klient: Klient;
|
|
434
|
+
id_zamowienie_dokument: number;
|
|
435
|
+
zamowienie_dokument: ZamowienieDokumentAttributes;
|
|
436
|
+
id_uzytkownik_dodanie?: number;
|
|
437
|
+
id_uzytkownik_edycja?: number;
|
|
438
|
+
uzytkownik_dodanie?: Uzytkownik;
|
|
439
|
+
};
|
|
440
|
+
export interface LoginResponse {
|
|
441
|
+
application: {
|
|
442
|
+
version: string;
|
|
443
|
+
};
|
|
444
|
+
user: Uzytkownik;
|
|
445
|
+
}
|
|
446
|
+
export declare enum TypWplaty {
|
|
447
|
+
Gotowka = "KP",
|
|
448
|
+
Zaliczka = "ZA",
|
|
449
|
+
Karta = "DK",
|
|
450
|
+
Przelew = "DB"
|
|
451
|
+
}
|
|
452
|
+
export type WplataZamowienieDokument = Omit<ZamowienieDokumentAttributes, 'wartosc'> & {
|
|
453
|
+
wartosc: string;
|
|
454
|
+
suma_wplat: string;
|
|
455
|
+
};
|
|
456
|
+
export type ZamowienieDokument = ZamowienieDokumentAttributes & {
|
|
457
|
+
wplata: number;
|
|
458
|
+
klient: Klient;
|
|
459
|
+
klient_nabywca: Klient;
|
|
460
|
+
};
|
|
461
|
+
export declare enum FormaPlatnosci {
|
|
462
|
+
Gotowka = "G",
|
|
463
|
+
Pobranie = "O",
|
|
464
|
+
Karta = "K",
|
|
465
|
+
Przelew = "P"
|
|
466
|
+
}
|
|
467
|
+
export type HardwarePrinter = {
|
|
468
|
+
description: string;
|
|
469
|
+
displayName: string;
|
|
470
|
+
isDefault: boolean;
|
|
471
|
+
name: string;
|
|
472
|
+
options: {
|
|
473
|
+
copies: '1';
|
|
474
|
+
'device-uri': string;
|
|
475
|
+
finishings: string;
|
|
476
|
+
'job-cancel-after': string;
|
|
477
|
+
'job-hold-until': string;
|
|
478
|
+
'job-priority': string;
|
|
479
|
+
'job-sheets': string;
|
|
480
|
+
'marker-change-time': string;
|
|
481
|
+
'marker-colors': string;
|
|
482
|
+
'marker-high-levels': string;
|
|
483
|
+
'marker-levels': string;
|
|
484
|
+
'marker-low-levels': string;
|
|
485
|
+
'marker-names': string;
|
|
486
|
+
'marker-types': string;
|
|
487
|
+
'number-up': string;
|
|
488
|
+
'printer-commands': string;
|
|
489
|
+
'printer-info': string;
|
|
490
|
+
'printer-is-accepting-jobs': string;
|
|
491
|
+
'printer-is-shared': string;
|
|
492
|
+
'printer-is-temporary': string;
|
|
493
|
+
'printer-location': string;
|
|
494
|
+
'printer-make-and-model': string;
|
|
495
|
+
'printer-state': string;
|
|
496
|
+
'printer-state-change-time': string;
|
|
497
|
+
'printer-state-reasons': string;
|
|
498
|
+
'printer-type': string;
|
|
499
|
+
'printer-uri-supported': string;
|
|
500
|
+
system_driverinfo: string;
|
|
501
|
+
};
|
|
502
|
+
status: number;
|
|
503
|
+
};
|
|
504
|
+
export declare enum TypDokumentu {
|
|
505
|
+
Faktura = "FA",
|
|
506
|
+
FakturaDetal = "DE",
|
|
507
|
+
FakturaEksport = "EX",
|
|
508
|
+
Paragon = "PA"
|
|
509
|
+
}
|
|
510
|
+
export type ZaliczkaZamowienieDokument = Pick<WplataAttributes, 'id_wplata' | 'data_wplaty' | 'id_klient' | 'rozliczono' | 'kwota_wplaty'> & {
|
|
511
|
+
id_zaliczka_rozliczenie: number;
|
|
512
|
+
kwota_rozliczenia: number;
|
|
513
|
+
};
|
|
514
|
+
export type ZamowienieNowyDokumentElement = {
|
|
515
|
+
nazwa: string;
|
|
516
|
+
jednostka: Jednostka;
|
|
517
|
+
cena_jednostka: number;
|
|
518
|
+
cena_jednostka_netto: number;
|
|
519
|
+
podatek: number;
|
|
520
|
+
ilosc: number;
|
|
521
|
+
wartosc: number;
|
|
522
|
+
netto: number;
|
|
523
|
+
korekta: boolean;
|
|
524
|
+
};
|
|
525
|
+
export interface ZamowienieNowyDokumentElementRequest {
|
|
526
|
+
nazwa: string;
|
|
527
|
+
jednostka: Jednostka;
|
|
528
|
+
cena_jednostka: number;
|
|
529
|
+
cena_jednostka_netto: number;
|
|
530
|
+
podatek: number;
|
|
531
|
+
ilosc: number;
|
|
532
|
+
netto: number;
|
|
533
|
+
wartosc: number;
|
|
534
|
+
korekta: boolean;
|
|
535
|
+
}
|
|
536
|
+
export interface ZamowienieNowyDokumentRequest {
|
|
537
|
+
id_klient: number;
|
|
538
|
+
id_zamowienie: number[];
|
|
539
|
+
data_sprzedazy: string;
|
|
540
|
+
data_wystawienia: string;
|
|
541
|
+
data_platnosci: string;
|
|
542
|
+
typ_dokumentu: TypDokumentu;
|
|
543
|
+
forma_platnosci: FormaPlatnosci;
|
|
544
|
+
netto: number;
|
|
545
|
+
wartosc: number;
|
|
546
|
+
zamowienie_dokument_element: Array<ZamowienieNowyDokumentElementRequest>;
|
|
547
|
+
zaliczka_rozliczenie: number[];
|
|
548
|
+
}
|
|
549
|
+
export interface ZamowienieNowyDokumentResponse {
|
|
550
|
+
id_zamowienie_dokument: number;
|
|
551
|
+
numer: number;
|
|
552
|
+
numer_idx: number;
|
|
553
|
+
wz_numer: number;
|
|
554
|
+
wz_numer_idx: number;
|
|
555
|
+
}
|
|
556
|
+
export declare enum DokumentTyp {
|
|
557
|
+
WydanieZewnetrzne = "WZ",
|
|
558
|
+
WydanieWewnetrzne = "WW",
|
|
559
|
+
PrzychodWewnetrzny = "PW"
|
|
560
|
+
}
|
|
561
|
+
export type DokumentTypDowolny = null;
|
|
562
|
+
export type UseData<DataType> = (defValue: DataType[]) => [DataType[], (rows: DataType[]) => void];
|
|
563
|
+
export type ZamowienieDokumentMagazyn = ZamowienieDokumentMagazynAttributes & PrefixKeys<ZamowienieDokument, 'zamowienie_dokument'> & {
|
|
564
|
+
zamowienie_dokument: ZamowienieDokument;
|
|
565
|
+
uzytkownik_dodanie: Uzytkownik;
|
|
566
|
+
uzytkownik_edycja: Uzytkownik;
|
|
567
|
+
};
|
|
568
|
+
export type BuforElementInfo = {
|
|
569
|
+
bufor_element: BuforElement & {
|
|
570
|
+
parents: BuforElement[];
|
|
571
|
+
};
|
|
572
|
+
bufor_element_atrybut: (BuforElementAtrybut & {
|
|
573
|
+
id_rownanie_zmienna_kategoria: number;
|
|
574
|
+
})[];
|
|
575
|
+
atrybut_konfig: (AtrybutKonfig & {
|
|
576
|
+
nazwa: string;
|
|
577
|
+
typ: string;
|
|
578
|
+
id_rownanie_zmienna_kategoria: number;
|
|
579
|
+
})[];
|
|
580
|
+
};
|
|
581
|
+
export type BuforInfo = Bufor & {
|
|
582
|
+
id_cecha_pre1: number;
|
|
583
|
+
id_cecha_pre2: number;
|
|
584
|
+
id_cecha_pre3: number;
|
|
585
|
+
id_cecha_pre4: number;
|
|
586
|
+
};
|
|
587
|
+
export type BuforInfoResponse = {
|
|
588
|
+
bufor: BuforInfo;
|
|
589
|
+
bufor_element: BuforElementInfo[];
|
|
590
|
+
};
|
|
591
|
+
export type ZamowienieElementInfo = {
|
|
592
|
+
zamowienie_element: ZamowienieElement & {
|
|
593
|
+
parents: string;
|
|
594
|
+
};
|
|
595
|
+
zamowienie_element_atrybuty: (ZamowienieElementAtrybut & {
|
|
596
|
+
id_rownanie_zmienna_kategoria: number;
|
|
597
|
+
})[];
|
|
598
|
+
atrybut_konfig: (AtrybutKonfig & {
|
|
599
|
+
nazwa: string;
|
|
600
|
+
typ: string;
|
|
601
|
+
id_rownanie_zmienna_kategoria: number;
|
|
602
|
+
})[];
|
|
603
|
+
};
|
|
604
|
+
export type ZamowienieInfoResponse = {
|
|
605
|
+
zamowienie_elementy: ZamowienieElementInfo[];
|
|
606
|
+
};
|
|
607
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DokumentTyp = exports.TypDokumentu = exports.FormaPlatnosci = exports.TypWplaty = exports.RownanieTyp = exports.CechaTyp = exports.CechaKontrolka = exports.BuforStatus = exports.RabatSufix = exports.RabatPrefix = exports.Jednostka = exports.Zrodlo = void 0;
|
|
4
|
+
var Zrodlo;
|
|
5
|
+
(function (Zrodlo) {
|
|
6
|
+
Zrodlo["Web"] = "M";
|
|
7
|
+
Zrodlo["Producent"] = "P";
|
|
8
|
+
})(Zrodlo || (exports.Zrodlo = Zrodlo = {}));
|
|
9
|
+
var Jednostka;
|
|
10
|
+
(function (Jednostka) {
|
|
11
|
+
Jednostka[Jednostka["m2"] = 3] = "m2";
|
|
12
|
+
Jednostka[Jednostka["systemowy"] = null] = "systemowy";
|
|
13
|
+
Jednostka[Jednostka["szt"] = 1] = "szt";
|
|
14
|
+
Jednostka[Jednostka["m2old"] = -2] = "m2old";
|
|
15
|
+
})(Jednostka || (exports.Jednostka = Jednostka = {}));
|
|
16
|
+
var RabatPrefix;
|
|
17
|
+
(function (RabatPrefix) {
|
|
18
|
+
RabatPrefix["Brak"] = "N";
|
|
19
|
+
RabatPrefix["Narzut"] = "P";
|
|
20
|
+
RabatPrefix["Rabat"] = "M";
|
|
21
|
+
})(RabatPrefix || (exports.RabatPrefix = RabatPrefix = {}));
|
|
22
|
+
var RabatSufix;
|
|
23
|
+
(function (RabatSufix) {
|
|
24
|
+
RabatSufix["Procent"] = "%";
|
|
25
|
+
RabatSufix["Brak"] = "";
|
|
26
|
+
})(RabatSufix || (exports.RabatSufix = RabatSufix = {}));
|
|
27
|
+
var BuforStatus;
|
|
28
|
+
(function (BuforStatus) {
|
|
29
|
+
BuforStatus["False"] = "F";
|
|
30
|
+
BuforStatus["New"] = "N";
|
|
31
|
+
BuforStatus["Bufor"] = "B";
|
|
32
|
+
})(BuforStatus || (exports.BuforStatus = BuforStatus = {}));
|
|
33
|
+
var CechaKontrolka;
|
|
34
|
+
(function (CechaKontrolka) {
|
|
35
|
+
CechaKontrolka["PC_EDIT"] = "pcEdit ";
|
|
36
|
+
CechaKontrolka["PC_CBX"] = "pcCbx ";
|
|
37
|
+
CechaKontrolka["PC_HIDE"] = "pcHide ";
|
|
38
|
+
CechaKontrolka["PT_BOOL"] = "ptBool ";
|
|
39
|
+
})(CechaKontrolka || (exports.CechaKontrolka = CechaKontrolka = {}));
|
|
40
|
+
var CechaTyp;
|
|
41
|
+
(function (CechaTyp) {
|
|
42
|
+
CechaTyp["PT_INT"] = "ptInt ";
|
|
43
|
+
CechaTyp["PT_TXT"] = "ptTxt ";
|
|
44
|
+
})(CechaTyp || (exports.CechaTyp = CechaTyp = {}));
|
|
45
|
+
var RownanieTyp;
|
|
46
|
+
(function (RownanieTyp) {
|
|
47
|
+
RownanieTyp["Kalkulacja"] = "K";
|
|
48
|
+
})(RownanieTyp || (exports.RownanieTyp = RownanieTyp = {}));
|
|
49
|
+
var TypWplaty;
|
|
50
|
+
(function (TypWplaty) {
|
|
51
|
+
TypWplaty["Gotowka"] = "KP";
|
|
52
|
+
TypWplaty["Zaliczka"] = "ZA";
|
|
53
|
+
TypWplaty["Karta"] = "DK";
|
|
54
|
+
TypWplaty["Przelew"] = "DB";
|
|
55
|
+
})(TypWplaty || (exports.TypWplaty = TypWplaty = {}));
|
|
56
|
+
var FormaPlatnosci;
|
|
57
|
+
(function (FormaPlatnosci) {
|
|
58
|
+
FormaPlatnosci["Gotowka"] = "G";
|
|
59
|
+
FormaPlatnosci["Pobranie"] = "O";
|
|
60
|
+
FormaPlatnosci["Karta"] = "K";
|
|
61
|
+
FormaPlatnosci["Przelew"] = "P";
|
|
62
|
+
})(FormaPlatnosci || (exports.FormaPlatnosci = FormaPlatnosci = {}));
|
|
63
|
+
var TypDokumentu;
|
|
64
|
+
(function (TypDokumentu) {
|
|
65
|
+
TypDokumentu["Faktura"] = "FA";
|
|
66
|
+
TypDokumentu["FakturaDetal"] = "DE";
|
|
67
|
+
TypDokumentu["FakturaEksport"] = "EX";
|
|
68
|
+
TypDokumentu["Paragon"] = "PA";
|
|
69
|
+
})(TypDokumentu || (exports.TypDokumentu = TypDokumentu = {}));
|
|
70
|
+
var DokumentTyp;
|
|
71
|
+
(function (DokumentTyp) {
|
|
72
|
+
DokumentTyp["WydanieZewnetrzne"] = "WZ";
|
|
73
|
+
DokumentTyp["WydanieWewnetrzne"] = "WW";
|
|
74
|
+
DokumentTyp["PrzychodWewnetrzny"] = "PW";
|
|
75
|
+
})(DokumentTyp || (exports.DokumentTyp = DokumentTyp = {}));
|