@placeshakr/config 10.20.4 → 10.20.5-alpha.4

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,33 @@ export interface Project extends Resource {
1169
1192
  * Number of projects inside the project's enterprise
1170
1193
  */
1171
1194
  projectIndex: number;
1195
+
1196
+ /************************** MARKETPLACE **************************/
1197
+ /**
1198
+ * Used to display the project inside marketplace
1199
+ */
1200
+ marketplaceStatus?: MarketplaceStatus;
1201
+ /**
1202
+ * List of current users who applies the project
1203
+ */
1204
+ candidates?: string[];
1205
+ /**
1206
+ * Determines how many professionals can apply for the project
1207
+ */
1208
+ numberOfCandidates?: number;
1209
+ /**
1210
+ * creater the relation with his work order that generate this project
1211
+ */
1212
+ workOrderId?: string;
1213
+ /**
1214
+ * Save last time project was published in marketplace
1215
+ */
1216
+ marketplacePublishDate?: number;
1217
+ }
1218
+
1219
+ export enum MarketplaceStatus {
1220
+ OPEN = 'OPEN',
1221
+ CLOSE = 'CLOSE',
1172
1222
  }
1173
1223
 
1174
1224
  /**
@@ -3080,6 +3130,7 @@ export enum EmailTemplate {
3080
3130
  MEDIAS = 'medias',
3081
3131
  EXPORT_LOGS = 'export-logs',
3082
3132
  PLAN_VALIDATED = 'plan-validated',
3133
+ WORK_ORDER_APPROVED = 'work-order-approved',
3083
3134
  }
3084
3135
 
3085
3136
  export enum DevisPdfType {
@@ -3264,6 +3315,7 @@ export enum NomenclaturesIdentifier {
3264
3315
  COMMENTS_MODELS = 'COMMENTS_MODELS',
3265
3316
  EMAILS_COMMENTS_MODELS = 'EMAILS_COMMENTS_MODELS',
3266
3317
  PAYMENT_PLANNING = 'PAYMENT_PLANNING',
3318
+ PROJECTS_PRIORITY = 'PROJECTS_PRIORITY',
3267
3319
  }
3268
3320
 
3269
3321
  /**
@@ -3642,3 +3694,107 @@ export enum BillIssuedReasons {
3642
3694
  CREDIT_NOTE_ADMINISTRATIVE = 'CREDIT_NOTE_ADMINISTRATIVE',
3643
3695
  CREDIT_NOTE_OPERATIONAL = 'CREDIT_NOTE_OPERATIONAL',
3644
3696
  }
3697
+
3698
+ export enum EvaluationConfigIdentifier {
3699
+ PRO = 'PRO',
3700
+ }
3701
+
3702
+ export interface EvaluationConfigQuestion {
3703
+ order: number;
3704
+ title: string;
3705
+ weight: number;
3706
+ required: boolean;
3707
+ description?: string;
3708
+ }
3709
+
3710
+ export interface EvaluationConfig extends Resource {
3711
+ identifier: EvaluationConfigIdentifier;
3712
+ questions: EvaluationConfigQuestion[];
3713
+ }
3714
+
3715
+ export interface Evaluation extends Resource {
3716
+ identifier: EvaluationConfigIdentifier;
3717
+ questions: QuestionResponse[];
3718
+ result: number;
3719
+ projectId: string;
3720
+ userId: string;
3721
+ notes: string;
3722
+ }
3723
+
3724
+ export interface QuestionResponse extends EvaluationConfigQuestion {
3725
+ value?: number;
3726
+ text?: string;
3727
+ }
3728
+
3729
+ export interface DevisCandidate extends Devis {}
3730
+
3731
+ export enum WorkOrderStatusEnum {
3732
+ CREATED = 'CREATED',
3733
+ TO_VALIDATE = 'TO_VALIDATE',
3734
+ APPROVED = 'APPROVED',
3735
+ REFUSED = 'REFUSED',
3736
+ }
3737
+
3738
+ export interface WorkOrderStatusHistory {
3739
+ before: WorkOrderStatusEnum;
3740
+ after: WorkOrderStatusEnum;
3741
+ date: number;
3742
+ userId: string;
3743
+ comments: string;
3744
+ }
3745
+
3746
+ export enum WorkOrderPriceRange {
3747
+ LESS_2500 = 'LESS_2500',
3748
+ MORE_2500_LESS_10000 = 'MORE_2500_LESS_10000',
3749
+ MORE_10000_LESS_40000 = 'MORE_10000_LESS_40000',
3750
+ MORE_40000 = 'MORE_40000',
3751
+ }
3752
+
3753
+ export interface WorkOrder extends Resource {
3754
+ title: string;
3755
+ /**
3756
+ * Référence interne à la SNCF généré par l’outil iGO en
3757
+ * amont de la création de l’OT dans la marketplace
3758
+ */
3759
+ reference: string;
3760
+ /**
3761
+ * Nom de l’Agence Bâtiment Energies (ABE) de la SNCF
3762
+ */
3763
+ agenceName: string;
3764
+ /**
3765
+ * Permet de retranscrire précisément le besoin travaux
3766
+ */
3767
+ description: string;
3768
+ /**
3769
+ * Adresse du lieu des travaux (N°-Rue-Nom de la voie-CP-Ville)
3770
+ */
3771
+ address: string;
3772
+ addressComments: string;
3773
+ region: string;
3774
+ priority: string;
3775
+ estimatedDate: number;
3776
+ files: File[];
3777
+ images: File[];
3778
+ estimatedPrice?: number;
3779
+ rangeOfPrice?: WorkOrderPriceRange;
3780
+ daysToClose: number;
3781
+ status: WorkOrderStatusEnum;
3782
+ statusHistory: WorkOrderStatusHistory[];
3783
+
3784
+ mandatorySiteVisit: boolean;
3785
+ client: string;
3786
+ centralInformationAccounting: string;
3787
+ localInformationAccounting: string;
3788
+ /**
3789
+ * It is used to determine if it is a job where there are toxic substances such as lead.
3790
+ */
3791
+ toxicSubstances: boolean;
3792
+ /**
3793
+ * Reference to the project once the order is approved and a new project created with its data
3794
+ */
3795
+ projectId?: string;
3796
+ }
3797
+
3798
+ export interface Candidatures extends Resource {
3799
+ userId: string;
3800
+ }