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:
louispaulb 2026-07-07 21:27:32 -04:00
parent 987ae98bfc
commit 675e1b0bdd
5 changed files with 21 additions and 25 deletions

View File

@ -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']

View File

@ -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([])

View File

@ -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' },

View 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)

View File

@ -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' },