refactor: rename prestataire to constructeur
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<h3 class="text-lg font-semibold">{{ component.name }}</h3>
|
||||
<div class="flex flex-wrap gap-2 mt-2">
|
||||
<span v-if="component.reference" class="badge badge-outline badge-sm">{{ component.reference }}</span>
|
||||
<span v-if="component.prestataire" class="badge badge-outline badge-sm">{{ component.prestataire }}</span>
|
||||
<span v-if="component.constructeur" class="badge badge-outline badge-sm">{{ component.constructeur }}</span>
|
||||
<span v-if="component.emplacement" class="badge badge-outline badge-sm">{{ component.emplacement }}</span>
|
||||
<span v-if="component.prix" class="badge badge-primary badge-sm">{{ component.prix }}€</span>
|
||||
</div>
|
||||
@@ -55,15 +55,15 @@
|
||||
<div v-else class="input input-bordered input-sm bg-base-200">{{ component.reference || 'Non définie' }}</div>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text font-medium">Prestataire</span></label>
|
||||
<label class="label"><span class="label-text font-medium">Constructeur</span></label>
|
||||
<input
|
||||
v-if="isEditMode"
|
||||
v-model="component.prestataire"
|
||||
v-model="component.constructeur"
|
||||
type="text"
|
||||
class="input input-bordered input-sm"
|
||||
@blur="updateComponent"
|
||||
/>
|
||||
<div v-else class="input input-bordered input-sm bg-base-200">{{ component.prestataire || 'Non défini' }}</div>
|
||||
<div v-else class="input input-bordered input-sm bg-base-200">{{ component.constructeur || 'Non défini' }}</div>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text font-medium">Emplacement</span></label>
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
<span v-else class="ml-2">{{ pieceData.reference || 'Non définie' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium">Prestataire:</span>
|
||||
<span class="font-medium">Constructeur:</span>
|
||||
<input
|
||||
v-if="isEditMode"
|
||||
:id="`piece-prestataire-${piece.id}`"
|
||||
v-model="pieceData.prestataire"
|
||||
:id="`piece-constructeur-${piece.id}`"
|
||||
v-model="pieceData.constructeur"
|
||||
type="text"
|
||||
class="input input-sm input-bordered ml-2"
|
||||
@blur="updatePiece"
|
||||
/>
|
||||
<span v-else class="ml-2">{{ pieceData.prestataire || 'Non défini' }}</span>
|
||||
<span v-else class="ml-2">{{ pieceData.constructeur || 'Non défini' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium">Emplacement:</span>
|
||||
@@ -190,7 +190,7 @@ const emit = defineEmits(['update', 'edit', 'custom-field-update'])
|
||||
const pieceData = reactive({
|
||||
name: props.piece.name || '',
|
||||
reference: props.piece.reference || '',
|
||||
prestataire: props.piece.prestataire || '',
|
||||
constructeur: props.piece.constructeur || '',
|
||||
emplacement: props.piece.emplacement || '',
|
||||
prix: props.piece.prix || ''
|
||||
})
|
||||
@@ -236,7 +236,7 @@ onMounted(() => {
|
||||
// Initialiser les données avec les props
|
||||
pieceData.name = props.piece.name || ''
|
||||
pieceData.reference = props.piece.reference || ''
|
||||
pieceData.prestataire = props.piece.prestataire || ''
|
||||
pieceData.constructeur = props.piece.constructeur || ''
|
||||
pieceData.emplacement = props.piece.emplacement || ''
|
||||
pieceData.prix = props.piece.prix || ''
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
<template v-if="expanded">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
||||
<div v-if="component.prestataire" class="text-sm">
|
||||
<span class="font-medium">Prestataire:</span> {{ component.prestataire }}
|
||||
<div v-if="component.constructeur" class="text-sm">
|
||||
<span class="font-medium">Constructeur:</span> {{ component.constructeur }}
|
||||
</div>
|
||||
<div v-if="component.emplacement" class="text-sm">
|
||||
<span class="font-medium">Emplacement:</span> {{ component.emplacement }}
|
||||
@@ -126,8 +126,8 @@
|
||||
|
||||
<div v-if="isPieceExpanded(pieceIndex)">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-2 mb-2">
|
||||
<div v-if="piece.prestataire" class="text-xs">
|
||||
<span class="font-medium">Prestataire:</span> {{ piece.prestataire }}
|
||||
<div v-if="piece.constructeur" class="text-xs">
|
||||
<span class="font-medium">Constructeur:</span> {{ piece.constructeur }}
|
||||
</div>
|
||||
<div v-if="piece.emplacement" class="text-xs">
|
||||
<span class="font-medium">Emplacement:</span> {{ piece.emplacement }}
|
||||
@@ -225,8 +225,8 @@
|
||||
|
||||
<div v-if="isSubComponentExpanded(subIndex)" class="space-y-3">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
|
||||
<div v-if="subComponent.prestataire" class="text-xs">
|
||||
<span class="font-medium">Prestataire:</span> {{ subComponent.prestataire }}
|
||||
<div v-if="subComponent.constructeur" class="text-xs">
|
||||
<span class="font-medium">Constructeur:</span> {{ subComponent.constructeur }}
|
||||
</div>
|
||||
<div v-if="subComponent.emplacement" class="text-xs">
|
||||
<span class="font-medium">Emplacement:</span> {{ subComponent.emplacement }}
|
||||
@@ -320,8 +320,8 @@
|
||||
|
||||
<div v-if="isSubPieceExpanded(subIndex, pieceIndex)">
|
||||
<div class="grid grid-cols-2 gap-1 text-[11px] mb-1">
|
||||
<div v-if="piece.prestataire">
|
||||
<span class="font-medium">Prestataire:</span> {{ piece.prestataire }}
|
||||
<div v-if="piece.constructeur">
|
||||
<span class="font-medium">Constructeur:</span> {{ piece.constructeur }}
|
||||
</div>
|
||||
<div v-if="piece.emplacement">
|
||||
<span class="font-medium">Emplacement:</span> {{ piece.emplacement }}
|
||||
@@ -401,8 +401,8 @@ const expandedSubComponentPieceCustomFields = reactive({})
|
||||
|
||||
const compactInfo = computed(() => {
|
||||
const infos = []
|
||||
if (props.component?.prestataire) {
|
||||
infos.push(props.component.prestataire)
|
||||
if (props.component?.constructeur) {
|
||||
infos.push(props.component.constructeur)
|
||||
}
|
||||
if (props.component?.emplacement) {
|
||||
infos.push(props.component.emplacement)
|
||||
@@ -412,14 +412,14 @@ const compactInfo = computed(() => {
|
||||
|
||||
const quickPieceSummary = (piece) => {
|
||||
const infos = []
|
||||
if (piece?.prestataire) infos.push(piece.prestataire)
|
||||
if (piece?.constructeur) infos.push(piece.constructeur)
|
||||
if (piece?.emplacement) infos.push(piece.emplacement)
|
||||
return infos.join(' • ')
|
||||
}
|
||||
|
||||
const quickSubSummary = (subComponent) => {
|
||||
const infos = []
|
||||
if (subComponent?.prestataire) infos.push(subComponent.prestataire)
|
||||
if (subComponent?.constructeur) infos.push(subComponent.constructeur)
|
||||
if (subComponent?.emplacement) infos.push(subComponent.emplacement)
|
||||
return infos.join(' • ')
|
||||
}
|
||||
|
||||
@@ -91,12 +91,12 @@
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Prestataire</span>
|
||||
<span class="label-text">Constructeur</span>
|
||||
</label>
|
||||
<input
|
||||
v-model="component.prestataire"
|
||||
v-model="component.constructeur"
|
||||
type="text"
|
||||
placeholder="Prestataire"
|
||||
placeholder="Constructeur"
|
||||
class="input input-bordered input-sm"
|
||||
/>
|
||||
</div>
|
||||
@@ -1015,7 +1015,7 @@ const addComponent = () => {
|
||||
components.value.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
pieces: [],
|
||||
@@ -1095,7 +1095,7 @@ const addComponentPiece = (componentIndex) => {
|
||||
component.pieces.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: []
|
||||
@@ -1156,7 +1156,7 @@ const addSubComponent = (componentIndex) => {
|
||||
component.subComponents.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: [],
|
||||
@@ -1226,7 +1226,7 @@ const addSubComponentPiece = (componentIndex, subIndex) => {
|
||||
subComponent.pieces.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: []
|
||||
|
||||
@@ -348,12 +348,12 @@
|
||||
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Prestataire</span>
|
||||
<span class="label-text">Constructeur</span>
|
||||
</label>
|
||||
<input
|
||||
v-model="piece.prestataire"
|
||||
v-model="piece.constructeur"
|
||||
type="text"
|
||||
placeholder="Prestataire"
|
||||
placeholder="Constructeur"
|
||||
class="input input-bordered input-sm"
|
||||
/>
|
||||
</div>
|
||||
@@ -586,12 +586,12 @@
|
||||
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Prestataire</span>
|
||||
<span class="label-text">Constructeur</span>
|
||||
</label>
|
||||
<input
|
||||
v-model="component.prestataire"
|
||||
v-model="component.constructeur"
|
||||
type="text"
|
||||
placeholder="Prestataire"
|
||||
placeholder="Constructeur"
|
||||
class="input input-bordered input-sm"
|
||||
/>
|
||||
</div>
|
||||
@@ -1176,7 +1176,7 @@ const addMachinePiece = () => {
|
||||
formData.machinePieces.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: []
|
||||
@@ -1237,7 +1237,7 @@ const addComponent = () => {
|
||||
formData.components.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: [],
|
||||
@@ -1310,7 +1310,7 @@ const addComponentPiece = (componentIndex) => {
|
||||
formData.components[componentIndex].pieces.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: []
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<div v-if="piece.reference" class="text-sm">
|
||||
<span class="font-medium">Référence:</span> {{ piece.reference }}
|
||||
</div>
|
||||
<div v-if="piece.prestataire" class="text-sm">
|
||||
<span class="font-medium">Prestataire:</span> {{ piece.prestataire }}
|
||||
<div v-if="piece.constructeur" class="text-sm">
|
||||
<span class="font-medium">Constructeur:</span> {{ piece.constructeur }}
|
||||
</div>
|
||||
<div v-if="piece.emplacement" class="text-sm">
|
||||
<span class="font-medium">Emplacement:</span> {{ piece.emplacement }}
|
||||
@@ -78,8 +78,8 @@ const expanded = ref(true)
|
||||
|
||||
const quickSummary = computed(() => {
|
||||
const infos = []
|
||||
if (props.piece?.prestataire) {
|
||||
infos.push(props.piece.prestataire)
|
||||
if (props.piece?.constructeur) {
|
||||
infos.push(props.piece.constructeur)
|
||||
}
|
||||
if (props.piece?.emplacement) {
|
||||
infos.push(props.piece.emplacement)
|
||||
|
||||
@@ -87,12 +87,12 @@
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Prestataire</span>
|
||||
<span class="label-text">Constructeur</span>
|
||||
</label>
|
||||
<input
|
||||
v-model="piece.prestataire"
|
||||
v-model="piece.constructeur"
|
||||
type="text"
|
||||
placeholder="Prestataire"
|
||||
placeholder="Constructeur"
|
||||
class="input input-bordered input-sm"
|
||||
/>
|
||||
</div>
|
||||
@@ -326,7 +326,7 @@ const addPiece = () => {
|
||||
pieces.value.push({
|
||||
name: '',
|
||||
reference: '',
|
||||
prestataire: '',
|
||||
constructeur: '',
|
||||
emplacement: '',
|
||||
prix: null,
|
||||
customFields: []
|
||||
|
||||
Reference in New Issue
Block a user