@placeshakr/config 10.20.4 → 10.20.5-alpha.0

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.
@@ -38,6 +38,7 @@ const test: EnvironmentDecorator = (base: Environment) => ({
38
38
  operationsCatalogs: 'operations-catalogs',
39
39
  nomenclatures: 'nomenclatures',
40
40
  operationsGroups: 'operations-groups',
41
+ workOrders: 'work-orders',
41
42
  // used only for managment
42
43
  systemMaterials: 'system-materials',
43
44
  systemOperations: 'system-operations',
@@ -45,7 +46,7 @@ const test: EnvironmentDecorator = (base: Environment) => ({
45
46
  systemMaterialsProvider: 'system-materials-provider',
46
47
  systemStatus: 'test-system-status',
47
48
  systemNomenclatures: 'test-system-nomenclatures',
48
- systemCategories: 'system-categories'
49
+ systemCategories: 'system-categories',
49
50
  },
50
51
  },
51
52
  isTest: true,
@@ -78,6 +79,7 @@ const emulator: EnvironmentDecorator = (base: Environment) => ({
78
79
  operationsCatalogs: 'operations-catalogs',
79
80
  nomenclatures: 'nomenclatures',
80
81
  operationsGroups: 'operations-groups',
82
+ workOrders: 'work-orders',
81
83
  // used only for managment
82
84
  systemMaterials: 'system-materials',
83
85
  systemOperations: 'system-operations',
@@ -85,7 +87,7 @@ const emulator: EnvironmentDecorator = (base: Environment) => ({
85
87
  systemMaterialsProvider: 'system-materials-provider',
86
88
  systemStatus: 'emulator-system-status',
87
89
  systemNomenclatures: 'emulator-system-nomenclatures',
88
- systemCategories: 'system-categories'
90
+ systemCategories: 'system-categories',
89
91
  },
90
92
  },
91
93
  isTest: true,
@@ -50,6 +50,7 @@ export interface Environment {
50
50
  operationsMaterials: string;
51
51
  estimations: string;
52
52
  nomenclatures: string;
53
+ workOrders: string;
53
54
  // used only for management - 7
54
55
  systemMaterials: string;
55
56
  systemOperations: string;
@@ -101,6 +102,11 @@ export interface Environment {
101
102
  logs: string;
102
103
  systemVersions: string;
103
104
  userProfiles: string;
105
+ evaluationsConfig: string;
106
+ evaluations: string;
107
+ devisCandidates: string;
108
+ workOrders: string;
109
+ candidatures: string;
104
110
  };
105
111
  docs: {
106
112
  user: string;
@@ -146,6 +152,11 @@ export interface Environment {
146
152
  configuration: string;
147
153
  log: string;
148
154
  systemVersion: string;
155
+ evaluationConfig: string;
156
+ evaluation: string;
157
+ devisCandidate: string;
158
+ workOrder: string;
159
+ candidature: string;
149
160
  };
150
161
  };
151
162
 
@@ -43,6 +43,11 @@ export interface Helpers {
43
43
  enterpriseMedias: FactoryCreate<articho.EnterpriseResourse>;
44
44
  configurations: FactoryCreate<articho.Configuration>;
45
45
  systemVersions: FactoryCreate<articho.SystemVersion>;
46
+ evaluationConfig: FactoryCreate<articho.EvaluationConfig>;
47
+ evaluations: FactoryCreate<articho.Evaluation>;
48
+ devisCandidates: FactoryCreate<articho.Evaluation>;
49
+ workOrders: FactoryCreate<articho.WorkOrder>;
50
+ candidatures: FactoryCreate<articho.Candidatures>;
46
51
  indexes: FactoryCreate<any>;
47
52
  }
48
53
 
@@ -100,7 +105,12 @@ const helpers: Helpers = {
100
105
  enterpriseMedias: FactoryCreateFunction(),
101
106
  configurations: FactoryCreateFunction(),
102
107
  systemVersions: FactoryCreateFunction(),
108
+ evaluationConfig: FactoryCreateFunction(),
109
+ evaluations: FactoryCreateFunction(),
103
110
  indexes: FactoryCreateFunction(),
111
+ devisCandidates: FactoryCreateFunction(),
112
+ workOrders: FactoryCreateFunction(),
113
+ candidatures: FactoryCreateFunction(),
104
114
  };
105
115
 
106
116
  export default helpers;
package/src/types.ts CHANGED
@@ -429,7 +429,7 @@ export interface Enterprise extends Resource {
429
429
  certificates: Certificate[];
430
430
 
431
431
  /**
432
- * Used to enabled or disable pluguins on the system
432
+ * Used to enabled or disable plugins on the system
433
433
  */
434
434
  pluginsConfig?: {
435
435
  visitReport?: boolean;
@@ -438,6 +438,7 @@ export interface Enterprise extends Resource {
438
438
  quoteAdvancedWithNewDesign?: boolean;
439
439
  exportLogs?: boolean;
440
440
  whatsapp?: boolean;
441
+ marketplace?: boolean;
441
442
  };
442
443
 
443
444
  /**
@@ -457,8 +458,30 @@ export interface Enterprise extends Resource {
457
458
  * Providers configuration
458
459
  */
459
460
  providersConfiguration?: ProvidersConfiguration;
461
+
462
+ /**
463
+ * Professional evalution config
464
+ */
465
+ proEvaluationConfig?: ProEvaluationItem[];
466
+
467
+ /**
468
+ * All marketplace's properties at enterprise level
469
+ */
470
+ marketplace?: EnterpriseMarketplace;
460
471
  }
461
472
 
473
+ export interface ProEvaluationItem {
474
+ title: string;
475
+ order: number;
476
+ percent: number;
477
+ description?: string;
478
+ }
479
+
480
+ export type EnterpriseMarketplace = {
481
+ maxCandidatesPerProject: number;
482
+ maxApplicationsAtSameTime: number;
483
+ };
484
+
462
485
  export type Certificate = { name: string; number: number };
463
486
 
464
487
  export interface StatusWorkflow {
@@ -1068,7 +1091,7 @@ export interface EnterpriseResourse extends Resource {
1068
1091
  export interface Project extends Resource {
1069
1092
  name: string;
1070
1093
  image?: File;
1071
- category: ProjectCategoriesEnum;
1094
+ category: string;
1072
1095
  surface: number;
1073
1096
  address: string;
1074
1097
 
@@ -1169,6 +1192,32 @@ export interface Project extends Resource {
1169
1192
  * Number of projects inside the project's enterprise
1170
1193
  */
1171
1194
  projectIndex: number;
1195
+
1196
+ /**
1197
+ * Used to display the project inside marketplace
1198
+ */
1199
+ marketplaceStatus?: MarketplaceStatus;
1200
+ /**
1201
+ * List of current users who applies the project
1202
+ */
1203
+ candidates?: string[];
1204
+ /**
1205
+ * Determines how many professionals can apply for the project
1206
+ */
1207
+ numberOfCandidates?: number;
1208
+ /**
1209
+ * Determines minimun of devis to validate project
1210
+ */
1211
+ numberOfDevisCandidates?: number;
1212
+ /**
1213
+ * creater the relation with his work order that generate this project
1214
+ */
1215
+ workOrderId?: string;
1216
+ }
1217
+
1218
+ export enum MarketplaceStatus {
1219
+ OPEN = 'OPEN',
1220
+ CLOSE = 'CLOSE',
1172
1221
  }
1173
1222
 
1174
1223
  /**
@@ -3080,6 +3129,7 @@ export enum EmailTemplate {
3080
3129
  MEDIAS = 'medias',
3081
3130
  EXPORT_LOGS = 'export-logs',
3082
3131
  PLAN_VALIDATED = 'plan-validated',
3132
+ WORK_ORDER_APPROVED = 'work-order-approved',
3083
3133
  }
3084
3134
 
3085
3135
  export enum DevisPdfType {
@@ -3264,6 +3314,7 @@ export enum NomenclaturesIdentifier {
3264
3314
  COMMENTS_MODELS = 'COMMENTS_MODELS',
3265
3315
  EMAILS_COMMENTS_MODELS = 'EMAILS_COMMENTS_MODELS',
3266
3316
  PAYMENT_PLANNING = 'PAYMENT_PLANNING',
3317
+ PROJECTS_PRIORITY = 'PROJECTS_PRIORITY',
3267
3318
  }
3268
3319
 
3269
3320
  /**
@@ -3642,3 +3693,106 @@ export enum BillIssuedReasons {
3642
3693
  CREDIT_NOTE_ADMINISTRATIVE = 'CREDIT_NOTE_ADMINISTRATIVE',
3643
3694
  CREDIT_NOTE_OPERATIONAL = 'CREDIT_NOTE_OPERATIONAL',
3644
3695
  }
3696
+
3697
+ export enum EvaluationConfigIdentifier {
3698
+ PRO = 'PRO',
3699
+ }
3700
+
3701
+ export interface EvaluationConfigQuestion {
3702
+ order: number;
3703
+ title: string;
3704
+ weight: number;
3705
+ required: boolean;
3706
+ description?: string;
3707
+ }
3708
+
3709
+ export interface EvaluationConfig extends Resource {
3710
+ identifier: EvaluationConfigIdentifier;
3711
+ questions: EvaluationConfigQuestion[];
3712
+ }
3713
+
3714
+ export interface Evaluation extends Resource {
3715
+ identifier: EvaluationConfigIdentifier;
3716
+ questions: QuestionResponse[];
3717
+ result: number;
3718
+ projectId: string;
3719
+ userId: string;
3720
+ notes: string;
3721
+ }
3722
+
3723
+ export interface QuestionResponse extends EvaluationConfigQuestion {
3724
+ value?: number;
3725
+ text?: string;
3726
+ }
3727
+
3728
+ export interface DevisCandidate extends Devis {}
3729
+
3730
+ export enum WorkOrderStatusEnum {
3731
+ CREATED = 'CREATED',
3732
+ TO_VALIDATE = 'TO_VALIDATE',
3733
+ APPROVED = 'APPROVED',
3734
+ REFUSED = 'REFUSED',
3735
+ }
3736
+
3737
+ export interface WorkOrderStatusHistory {
3738
+ before: WorkOrderStatusEnum;
3739
+ after: WorkOrderStatusEnum;
3740
+ date: number;
3741
+ userId: string;
3742
+ comments: string;
3743
+ }
3744
+
3745
+ export enum WorkOrderPriceRange {
3746
+ LESS_2500 = 'LESS_2500',
3747
+ MORE_2500_LESS_10000 = 'MORE_2500_LESS_10000',
3748
+ MORE_10000_LESS_40000 = 'MORE_10000_LESS_40000',
3749
+ MORE_40000 = 'MORE_40000',
3750
+ }
3751
+
3752
+ export interface WorkOrder extends Resource {
3753
+ /**
3754
+ * Référence interne à la SNCF généré par l’outil iGO en
3755
+ * amont de la création de l’OT dans la marketplace
3756
+ */
3757
+ reference: string;
3758
+ /**
3759
+ * Date de création de la demande dans l’outil iGO en amont de
3760
+ * la création de l’OT dans la marketplace
3761
+ */
3762
+ createdDate: number;
3763
+ /**
3764
+ * Nom de l’Agence Bâtiment Energies (ABE) de la SNCF
3765
+ */
3766
+ agenceName: string;
3767
+ /**
3768
+ * Permet de retranscrire précisément le besoin travaux
3769
+ */
3770
+ description: string;
3771
+ /**
3772
+ * Adresse du lieu des travaux (N°-Rue-Nom de la voie-CP-Ville)
3773
+ */
3774
+ address: string;
3775
+ addressComments: string;
3776
+ priority: string;
3777
+ estimatedDate: number;
3778
+ files: File[];
3779
+ images: File[];
3780
+ estimatedPrice?: number;
3781
+ rangeOfPrice?: WorkOrderPriceRange;
3782
+ daysToClose: number;
3783
+ status: WorkOrderStatusEnum;
3784
+ statusHistory: WorkOrderStatusHistory[];
3785
+
3786
+ mandatorySiteVisit: boolean;
3787
+ client: string;
3788
+ centralInformationAccounting: string;
3789
+ localInformationAccounting: string;
3790
+ /**
3791
+ * Reference to the project once the order is approved and a new project created with its data
3792
+ */
3793
+ projectId?: string;
3794
+ }
3795
+
3796
+ export interface Candidatures extends Resource {
3797
+ userId: string;
3798
+ }