ops : types de job = source unique (config/job-types)
Suite de la consolidation des énumérations partagées (après priorités). - config/job-types.js (NOUVEAU) : JOB_TYPE_OPTIONS + JOB_TYPES (Installation/Réparation/ Maintenance/Retrait/Dépannage/Autre) = SOURCE UNIQUE - élimine 3 copies : wizard-constants (ré-exporte désormais), TaskNode, UnifiedCreateModal, flow-editor/kind-catalogs (JOB_TYPES) - LAISSÉS volontairement (vocabulaires DISTINCTS, pas des doublons) : statuts de job (cycle de vie ≠ actions du pool ≠ ticket ≠ campagne ≠ appareil) ; issueTypeOptions ; jobTypes de l'app terrain (valeurs anglaises Repair/Delivery/Other — à réconcilier séparément, risque de données) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
987ae98bfc
commit
675e1b0bdd
|
|
@ -64,7 +64,7 @@ export const TRIGGER_TYPES = {
|
|||
// Project kinds — for the project wizard + service orchestration flows
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const JOB_TYPES = ['Installation', 'Réparation', 'Maintenance', 'Retrait', 'Dépannage', 'Autre']
|
||||
import { JOB_TYPES } from 'src/config/job-types' // types de job — SOURCE UNIQUE
|
||||
const PRIORITIES = ['low', 'medium', 'high']
|
||||
const GROUPS = ['Admin', 'Tech Targo', 'Support', 'NOC', 'Facturation']
|
||||
|
||||
|
|
|
|||
|
|
@ -179,14 +179,8 @@ const statusOptions = [
|
|||
]
|
||||
// Priorité Dispatch Job — SOURCE UNIQUE (config/dispatch-priority).
|
||||
import { DISPATCH_PRIORITIES as priorityOptions } from 'src/config/dispatch-priority'
|
||||
const jobTypeOptions = [
|
||||
{ label: 'Installation', value: 'Installation' },
|
||||
{ label: 'Réparation', value: 'Réparation' },
|
||||
{ label: 'Maintenance', value: 'Maintenance' },
|
||||
{ label: 'Retrait', value: 'Retrait' },
|
||||
{ label: 'Dépannage', value: 'Dépannage' },
|
||||
{ label: 'Autre', value: 'Autre' },
|
||||
]
|
||||
// Types de job — SOURCE UNIQUE (config/job-types).
|
||||
import { JOB_TYPE_OPTIONS as jobTypeOptions } from 'src/config/job-types'
|
||||
|
||||
// ── Tech loading (lazy) ──
|
||||
const techOptions = ref([])
|
||||
|
|
|
|||
|
|
@ -224,14 +224,8 @@ const getTagColor = computed(() => props.externalGetColor || internalGetTagColor
|
|||
// Priorité Dispatch Job — SOURCE UNIQUE (3 niveaux ; « Urgent » = high, le champ Select rejette 'urgent' → 417).
|
||||
import { DISPATCH_PRIORITIES as priorityOptions } from 'src/config/dispatch-priority'
|
||||
|
||||
const jobTypeOptions = [
|
||||
{ label: 'Installation', value: 'Installation' },
|
||||
{ label: 'Réparation', value: 'Réparation' },
|
||||
{ label: 'Maintenance', value: 'Maintenance' },
|
||||
{ label: 'Retrait', value: 'Retrait' },
|
||||
{ label: 'Dépannage', value: 'Dépannage' },
|
||||
{ label: 'Autre', value: 'Autre' },
|
||||
]
|
||||
// Types de job — SOURCE UNIQUE (config/job-types).
|
||||
import { JOB_TYPE_OPTIONS as jobTypeOptions } from 'src/config/job-types'
|
||||
|
||||
const issueTypeOptions = [
|
||||
{ label: 'Support', value: 'Support' },
|
||||
|
|
|
|||
14
apps/ops/src/config/job-types.js
Normal file
14
apps/ops/src/config/job-types.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Types de « job » (champ Dispatch Job.job_type) — SOURCE UNIQUE.
|
||||
// Importé partout où l'on choisit/affiche un type de job (modales de création, wizard projet,
|
||||
// nœud de tâche, éditeur de flux). Ajouter/renommer un type = un seul endroit.
|
||||
export const JOB_TYPE_OPTIONS = [
|
||||
{ label: 'Installation', value: 'Installation' },
|
||||
{ label: 'Réparation', value: 'Réparation' },
|
||||
{ label: 'Maintenance', value: 'Maintenance' },
|
||||
{ label: 'Retrait', value: 'Retrait' },
|
||||
{ label: 'Dépannage', value: 'Dépannage' },
|
||||
{ label: 'Autre', value: 'Autre' },
|
||||
]
|
||||
|
||||
// Libellés bruts (['Installation', 'Réparation', …]) pour les sélecteurs qui attendent un tableau de chaînes.
|
||||
export const JOB_TYPES = JOB_TYPE_OPTIONS.map(o => o.value)
|
||||
|
|
@ -1,13 +1,7 @@
|
|||
export const STEP_LABELS = ['Modèle', 'Étapes', 'Items / Devis', 'Sommaire', 'Publier']
|
||||
|
||||
export const JOB_TYPE_OPTIONS = [
|
||||
{ label: 'Installation', value: 'Installation' },
|
||||
{ label: 'Réparation', value: 'Réparation' },
|
||||
{ label: 'Maintenance', value: 'Maintenance' },
|
||||
{ label: 'Retrait', value: 'Retrait' },
|
||||
{ label: 'Dépannage', value: 'Dépannage' },
|
||||
{ label: 'Autre', value: 'Autre' },
|
||||
]
|
||||
// Types de job — SOURCE UNIQUE dans config/job-types (ré-exporté ici pour compat des imports existants).
|
||||
export { JOB_TYPE_OPTIONS } from 'src/config/job-types'
|
||||
|
||||
export const PRIORITY_OPTIONS = [
|
||||
{ label: 'Urgent', value: 'high' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user