feat: implement user management system and integrate AI services with Ollama and Gemini
This commit is contained in:
@@ -67,6 +67,14 @@ const getTimelineColor = (status) => {
|
||||
default: return 'bg-gray-400';
|
||||
}
|
||||
};
|
||||
|
||||
// Calculer le pourcentage du sous-devis par rapport au devis parent (commande)
|
||||
const getPercentage = (sdTotal) => {
|
||||
const parentTotal = parseFloat(props.order.data.amount_ttc);
|
||||
if (!parentTotal) return '0%';
|
||||
const pct = (parseFloat(sdTotal) / parentTotal) * 100;
|
||||
return `${pct.toFixed(1)} %`;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -378,6 +386,9 @@ const getTimelineColor = (status) => {
|
||||
<span class="text-sm font-bold text-slate-900 dark:text-slate-100">
|
||||
{{ new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(sd.total_ttc) }}
|
||||
</span>
|
||||
<span class="text-xs font-semibold text-slate-500 bg-slate-150/80 dark:bg-slate-800 dark:text-slate-400 px-1.5 py-0.5 rounded">
|
||||
{{ getPercentage(sd.total_ttc) }}
|
||||
</span>
|
||||
<Link :href="route('devis.show', sd.id)" class="text-xs font-semibold text-sky-600 dark:text-sky-400 hover:underline">
|
||||
Voir →
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user