ptechcore_ui 1.0.18 → 1.0.20

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.
Files changed (33) hide show
  1. package/dist/accountingblanc-HXO7ZL5C.svg +1 -0
  2. package/dist/accountingblue-KJT2COTJ.svg +1 -0
  3. package/dist/assetblanc-G4JYFDCR.svg +1 -0
  4. package/dist/assetblue-QVU5HCMT.svg +1 -0
  5. package/dist/collection_litigationblanc-7NRNT2NJ.svg +1 -0
  6. package/dist/collection_litigationblue-UNGB33BF.svg +1 -0
  7. package/dist/crm-blue-5IUN7OWK.svg +1 -0
  8. package/dist/crmwhite-T4YVRCBY.svg +1 -0
  9. package/dist/facilityblanc-X2W5XOZF.svg +1 -0
  10. package/dist/facilityblue-OSJ76HN4.svg +1 -0
  11. package/dist/financeblanc-FFBP6VCU.svg +1 -0
  12. package/dist/financeblue-C6ARC7XB.svg +1 -0
  13. package/dist/human_capitalblanc-44P3SKKG.svg +1 -0
  14. package/dist/human_capitalblue-IGF53KXL.svg +1 -0
  15. package/dist/index.cjs +1854 -310
  16. package/dist/index.d.cts +334 -39
  17. package/dist/index.d.ts +334 -39
  18. package/dist/index.js +2029 -443
  19. package/dist/invoicingblanc-OG4REEEI.svg +1 -0
  20. package/dist/invoicingblue-PGDRJHUT.svg +1 -0
  21. package/dist/marketingblanc-VGLH2RYX.svg +1 -0
  22. package/dist/marketingblue-M22Q2RVP.svg +1 -0
  23. package/dist/procurementblanc-C3K6S2GP.svg +1 -0
  24. package/dist/procurementblue-KXLG2CW4.svg +1 -0
  25. package/dist/security_managementblanc-44CBK332.svg +1 -0
  26. package/dist/security_managementblue-KPYN5QPS.svg +1 -0
  27. package/dist/sopblancs-LQYRWDFF.svg +1 -0
  28. package/dist/sopblues-MKSGDFK2.svg +1 -0
  29. package/dist/thriveblanc-C7YX45XG.svg +1 -0
  30. package/dist/thriveblue-MFDIWYWF.svg +1 -0
  31. package/dist/wiseblancs-W2M4CRXV.svg +1 -0
  32. package/dist/wiseblues-MMOO253P.svg +1 -0
  33. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -87,9 +87,75 @@ declare const RewiseLayout: React$1.FC<PrivateLayoutProps>;
87
87
 
88
88
  declare const ToastContainer: React$1.FC;
89
89
 
90
- interface Entity {
90
+ interface Module$1 {
91
+ id: number;
92
+ code: string;
93
+ name: string;
94
+ description?: string;
95
+ price: number;
96
+ is_active: boolean;
97
+ price_monthly: number;
98
+ price_yearly: number;
99
+ created_at: string;
100
+ updated_at: string;
101
+ is_deleted: boolean;
102
+ }
103
+ interface Plan {
104
+ id: number;
105
+ name: string;
106
+ description?: string;
107
+ price_monthly: number;
108
+ price_yearly: number;
109
+ max_users: number;
110
+ max_entities: number;
111
+ modules_included: Module$1[] | number[];
112
+ is_private: boolean;
113
+ private_for?: number | null;
114
+ created_at: string;
115
+ updated_at: string;
116
+ is_deleted: boolean;
117
+ }
118
+ interface Subscription {
91
119
  id: number;
92
120
  organization: number;
121
+ plan: Plan;
122
+ start_date: string;
123
+ end_date: string;
124
+ is_active: boolean;
125
+ created_at: string;
126
+ updated_at: string;
127
+ extra_modules?: Module$1[] | number[];
128
+ }
129
+
130
+ interface Module {
131
+ id: number;
132
+ code: string;
133
+ name: string;
134
+ description?: string;
135
+ price?: number;
136
+ price_monthly?: number;
137
+ price_yearly?: number;
138
+ is_active?: boolean;
139
+ is_deleted?: boolean;
140
+ deleted_at?: string | null;
141
+ }
142
+ interface Organization {
143
+ id: number;
144
+ legal_name: string;
145
+ trading_name?: string;
146
+ phone?: string;
147
+ email?: string;
148
+ address?: string;
149
+ owner: number;
150
+ active_subscription?: Subscription | null;
151
+ modules?: Module[];
152
+ created_at: string;
153
+ updated_at: string;
154
+ is_deleted: boolean;
155
+ }
156
+ interface Entity {
157
+ id: number;
158
+ organization: Organization | number;
93
159
  legal_name: string;
94
160
  trading_name?: string;
95
161
  phone?: string;
@@ -139,6 +205,45 @@ interface User {
139
205
  centers_access?: Entity[];
140
206
  }
141
207
 
208
+ type FromModule = 'accounting' | 'crm' | 'procurement';
209
+ interface Vendor {
210
+ id?: number;
211
+ legal_name: string;
212
+ trading_name?: string | null;
213
+ phone?: string | null;
214
+ email?: string | null;
215
+ logo?: string | null;
216
+ year_founded?: string | null;
217
+ activity_sector?: string | null;
218
+ description?: string | null;
219
+ accounting_account_number?: string | null;
220
+ capital?: number | null;
221
+ annual_turnover?: number | null;
222
+ payment_delay?: number | null;
223
+ country?: string | null;
224
+ city?: string | null;
225
+ address?: string | null;
226
+ legal_form?: string | null;
227
+ tax_regime?: string | null;
228
+ tax_account?: string | null;
229
+ rccm?: string | null;
230
+ legal_representative_name?: string | null;
231
+ legal_representative_address?: string | null;
232
+ legal_representative_phone?: string | null;
233
+ legal_representative_email?: string | null;
234
+ legal_representative_id_document?: string | null;
235
+ legal_representative_id_number?: string | null;
236
+ legal_representative_fonction?: string | null;
237
+ bank_name?: string | null;
238
+ bank_address?: string | null;
239
+ bank_email?: string | null;
240
+ bank_phone?: string | null;
241
+ iban?: string | null;
242
+ rib?: string | null;
243
+ from_module?: FromModule | null;
244
+ vendor_number: string;
245
+ }
246
+
142
247
  interface SessionContextType {
143
248
  isAuthenticated: boolean;
144
249
  token: string | null;
@@ -149,6 +254,11 @@ interface SessionContextType {
149
254
  logout: () => void;
150
255
  showAuthModal: boolean;
151
256
  setShowAuthModal: (data: boolean) => void;
257
+ vendors: Vendor[];
258
+ setVendors: (vendors: Vendor[]) => void;
259
+ loadingVendors: boolean;
260
+ setLoadingVendors: (loading: boolean) => void;
261
+ loadVendors: () => Promise<void>;
152
262
  }
153
263
  declare const useSession: () => SessionContextType;
154
264
  declare const SessionProvider: ({ children }: {
@@ -166,6 +276,13 @@ interface Toast {
166
276
  type: 'success' | 'error' | 'warning' | 'info';
167
277
  duration?: number;
168
278
  }
279
+ interface ConfirmOptions {
280
+ title?: string;
281
+ message: string;
282
+ confirmText?: string;
283
+ cancelText?: string;
284
+ type?: 'danger' | 'warning' | 'info';
285
+ }
169
286
  interface ToastContextType {
170
287
  toasts: Toast[];
171
288
  addToast: (toast: Omit<Toast, 'id'>) => void;
@@ -174,6 +291,7 @@ interface ToastContextType {
174
291
  error: (message: string, duration?: number) => void;
175
292
  warning: (message: string, duration?: number) => void;
176
293
  info: (message: string, duration?: number) => void;
294
+ confirm: (options: ConfirmOptions | string) => Promise<boolean>;
177
295
  }
178
296
  declare const useToast: () => ToastContextType;
179
297
  interface ToastProviderProps {
@@ -204,45 +322,45 @@ declare const UserServices: {
204
322
  addUserToEntity: (entityId: number, userId: number, token: string) => Promise<unknown>;
205
323
  };
206
324
 
207
- type FDrawerColumn = {
208
- key: string;
209
- label: string;
210
- type: 'text' | 'number' | 'date' | 'boolean' | 'custom';
211
- filterable?: boolean;
212
- filter_options?: {
213
- value: string;
214
- label: string;
215
- }[];
216
- sortable?: boolean;
217
- search_name: string;
218
- formule?: (item: any) => any | null;
219
- };
220
- type FDrawerLineAction = {
221
- label: string;
222
- permission: string;
223
- navigate?: string;
224
- onclick?: (item: any) => any;
225
- };
226
- interface FDrawerProps {
227
- children?: React$1.ReactNode;
228
- apiEndpoint: string;
229
- columns: FDrawerColumn[];
230
- actions: FDrawerLineAction[];
231
- ordering: string;
232
- toggle?: boolean;
325
+ interface SendOtpPayload {
326
+ email: string;
233
327
  }
234
- declare const FDrawer: React$1.FC<FDrawerProps>;
235
-
236
- interface ApprovalWorkflowProps {
237
- process: string;
238
- object_id: number;
239
- title?: string;
240
- readOnly?: boolean;
241
- CustomBtn?: React$1.ComponentType<{
242
- onClick?: () => void;
243
- }>;
328
+ interface VerifyOtpPayload {
329
+ email: string;
330
+ otp: string;
244
331
  }
245
- declare const ApprovalWorkflow: React$1.FC<ApprovalWorkflowProps>;
332
+ interface CompleteRegistrationPayload {
333
+ email: string;
334
+ password: string;
335
+ confirmed_password: string;
336
+ firstname?: string;
337
+ lastname?: string;
338
+ phonenumber?: string;
339
+ }
340
+ interface LoginPayload {
341
+ username: string;
342
+ password: string;
343
+ }
344
+ declare const AuthServices: {
345
+ sendOtp: (payload: SendOtpPayload) => Promise<unknown>;
346
+ verifyOtp: (payload: VerifyOtpPayload) => Promise<unknown>;
347
+ completeRegistration: (payload: CompleteRegistrationPayload) => Promise<unknown>;
348
+ getInvitations: (token: string) => Promise<unknown>;
349
+ respondInvitationEmail: (payload: {
350
+ email: string;
351
+ token: string;
352
+ answer: string;
353
+ }) => Promise<unknown>;
354
+ change_password: (payload: {
355
+ token: string;
356
+ password: string;
357
+ confirmed_password: string;
358
+ }) => Promise<unknown>;
359
+ addUser: (payload: User) => Promise<unknown>;
360
+ login: (payload: LoginPayload) => Promise<unknown>;
361
+ getUserInformations: (token: string) => Promise<unknown>;
362
+ logout: () => Promise<unknown>;
363
+ };
246
364
 
247
365
  declare enum ApprovalStatus {
248
366
  CANCEL = "cancel",
@@ -293,6 +411,183 @@ interface ApprovalCase {
293
411
  validations?: ApprovalAnswer[];
294
412
  object_detail?: any;
295
413
  }
414
+ interface ApprovalCaseCreatePayload {
415
+ title?: string;
416
+ process?: string;
417
+ object_id?: number;
418
+ status?: ApprovalStatus;
419
+ description?: string;
420
+ verifications?: Partial<ApprovalAnswer>[];
421
+ validations?: Partial<ApprovalAnswer>[];
422
+ }
423
+ interface ApprovalCaseUpdatePayload extends Partial<ApprovalCaseCreatePayload> {
424
+ id: number;
425
+ }
426
+
427
+ declare const ApprovalServices: {
428
+ /**
429
+ * Créer un nouveau cas d'approbation avec vérifications et validations
430
+ */
431
+ create: (data: ApprovalCaseCreatePayload, token: string) => Promise<{
432
+ success: boolean;
433
+ message: string;
434
+ data: {
435
+ case: ApprovalCase;
436
+ items: any[];
437
+ };
438
+ }>;
439
+ /**
440
+ * Obtenir tous les cas d'approbation
441
+ */
442
+ list: (token: string) => Promise<{
443
+ success: boolean;
444
+ message: string;
445
+ data: ApprovalCase[];
446
+ }>;
447
+ /**
448
+ * Obtenir les détails d'un cas d'approbation par process et object_id
449
+ */
450
+ getDetails: (process: string, object_id: number, token: string) => Promise<{
451
+ success: boolean;
452
+ message: string;
453
+ data: ApprovalCase;
454
+ }>;
455
+ getAnswerDetails: (link_token: string) => Promise<{
456
+ success: boolean;
457
+ message: string;
458
+ data: {
459
+ case: ApprovalCase;
460
+ answer_id: number;
461
+ };
462
+ }>;
463
+ /**
464
+ * Obtenir l'historique des versions d'un cas d'approbation
465
+ */
466
+ getHistory: (process: string, object_id: number, token: string) => Promise<{
467
+ success: boolean;
468
+ message: string;
469
+ data: ApprovalCase[];
470
+ }>;
471
+ /**
472
+ * Mettre à jour un cas d'approbation
473
+ */
474
+ update: (id: number, data: ApprovalCaseUpdatePayload, token: string) => Promise<{
475
+ success: boolean;
476
+ message: string;
477
+ data: {
478
+ case: ApprovalCase;
479
+ items: any[];
480
+ };
481
+ }>;
482
+ /**
483
+ * Démarrer le processus d'approbation d'un cas
484
+ */
485
+ start: (id: number, token: string) => Promise<{
486
+ success: boolean;
487
+ message: string;
488
+ data: {};
489
+ }>;
490
+ /**
491
+ * Annuler un cas d'approbation
492
+ */
493
+ cancel: (id: number, token: string) => Promise<{
494
+ success: boolean;
495
+ message: string;
496
+ data: {};
497
+ }>;
498
+ /**
499
+ * Redémarrer un cas d'approbation (nouvelle version)
500
+ */
501
+ restart: (id: number, token: string) => Promise<{
502
+ success: boolean;
503
+ message: string;
504
+ data: {};
505
+ }>;
506
+ /**
507
+ * Supprimer un cas d'approbation
508
+ */
509
+ delete: (id: number, token: string) => Promise<{
510
+ success: boolean;
511
+ message: string;
512
+ }>;
513
+ /**
514
+ * Approuver une réponse d'approbation
515
+ */
516
+ approve: (answerId: number, note?: string) => Promise<{
517
+ success: boolean;
518
+ message: string;
519
+ data: {};
520
+ }>;
521
+ /**
522
+ * Rejeter une réponse d'approbation
523
+ */
524
+ reject: (answerId: number, note?: string) => Promise<{
525
+ success: boolean;
526
+ message: string;
527
+ data: {};
528
+ }>;
529
+ /**
530
+ * Suggérer une correction pour une réponse d'approbation
531
+ */
532
+ suggestChange: (answerId: number, note?: string) => Promise<{
533
+ success: boolean;
534
+ message: string;
535
+ data: {};
536
+ }>;
537
+ };
538
+
539
+ type ImportField = {
540
+ value: string;
541
+ label: string;
542
+ };
543
+ type ImportFieldsConfig = {
544
+ required: ImportField[];
545
+ optional: ImportField[];
546
+ };
547
+ type FDrawerColumn = {
548
+ key: string;
549
+ label: string;
550
+ type: 'text' | 'number' | 'date' | 'boolean' | 'custom';
551
+ filterable?: boolean;
552
+ filter_options?: {
553
+ value: string;
554
+ label: string;
555
+ }[];
556
+ sortable?: boolean;
557
+ search_name: string;
558
+ formule?: (item: any) => any | null;
559
+ };
560
+ type FDrawerLineAction = {
561
+ label: string;
562
+ permission: string;
563
+ navigate?: string;
564
+ onclick?: (item: any) => any;
565
+ };
566
+ interface FDrawerProps {
567
+ children?: React$1.ReactNode;
568
+ apiEndpoint: string;
569
+ columns: FDrawerColumn[];
570
+ actions: FDrawerLineAction[];
571
+ ordering: string;
572
+ toggle?: boolean;
573
+ importEndpoint?: string;
574
+ importFields?: ImportFieldsConfig;
575
+ onBulkDelete?: (ids: number[]) => Promise<void>;
576
+ onDuplicate?: (item: any) => Promise<void>;
577
+ title?: string;
578
+ }
579
+ declare const FDrawer: React$1.FC<FDrawerProps>;
580
+
581
+ interface ApprovalWorkflowProps {
582
+ process: string;
583
+ object_id: number;
584
+ title?: string;
585
+ readOnly?: boolean;
586
+ CustomBtn?: React$1.ComponentType<{
587
+ onClick?: () => void;
588
+ }>;
589
+ }
590
+ declare const ApprovalWorkflow: React$1.FC<ApprovalWorkflowProps>;
296
591
 
297
592
  interface ApprovalAnswerModalProps {
298
593
  answer_id: number;
@@ -440,4 +735,4 @@ declare const TaxSelector: React$1.FC<TaxSelectProps>;
440
735
  declare const LegalFormSelector: React$1.FC<ChoiceSelectProps>;
441
736
  declare const CountrySelector: React$1.FC<ChoiceSelectProps>;
442
737
 
443
- export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalWorkflow, CHOICES, CountrySelector, DateInput, FDrawer, FetchApi, FileInput, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useAlert, useSession, useToast };
738
+ export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalServices, ApprovalWorkflow, AuthServices, CHOICES, type ConfirmOptions, CountrySelector, DateInput, FDrawer, FetchApi, FileInput, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useAlert, useSession, useToast };