fix: ♿ added an icon to indicate to the user that the configuration is currently archived

This commit is contained in:
Alexis Gousseau 2025-09-30 11:48:13 +02:00
parent 8ce3a93bdb
commit b03d9d4cbb
3 changed files with 26 additions and 2 deletions

View file

@ -88,6 +88,7 @@ return [
"config_select_fields" => "Overwrite fields with those of an existing language",
"config_save_warning" => "The configuration of related pages in :locale will be updated accordingly.",
"config_save_warning_list" => "Here is the list of :models concerned:|Here is the list of :models concerned:",
"config_archived" => "This configuration is currently archived",
"unsupported_type" => "Unsupported type:",
"missing_translations" => "The translation of the :field for the language :locales is missing.|The translation
of the :field for :locales languages are missing.",

View file

@ -88,6 +88,7 @@ return [
"config_save_warning" => "La configuration des pages associées dans la langue :locale sera mise à jour
en conséquence.",
"config_save_warning_list" => "Voici la liste des :models concernés:|Voici la liste des :models concernées:",
"config_archived" => "Cette configuration est actuellement archivée",
"unsupported_type" => "Type non supporté:",
"missing_translations" => "La traduction du champs :field pour la langue :locales est manquante.|La traduction
du champs :field pour les langues :locales sont manquantes.",

View file

@ -1,12 +1,24 @@
// * Packages
import { route } from "ziggy-js";
import { AlertCircle, Archive, ArrowLeft, Cog, Plus } from "lucide-react";
import {
AlertCircle,
Archive,
ArrowLeft,
Cog,
Plus,
TriangleAlert,
} from "lucide-react";
import { usePage, Link } from "@inertiajs/react";
import { Row } from "@tanstack/react-table";
// * Components shadcn
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
// * Other
import AuthenticatedLayout from "@/back/Layouts/AuthenticatedLayout";
import DataTable from "@/back/Components/Table/DataTable";
@ -92,7 +104,17 @@ export default function Index({
</Link>
</Button>
) : (
<span>{cellValue}</span>
<div className="flex flex-row justify-center items-center">
<span className="me-1">{cellValue}</span>
<Tooltip>
<TooltipTrigger asChild>
<TriangleAlert size={15} className="text-destructive" />
</TooltipTrigger>
<TooltipContent>
{useTrans("back.config_archived")}
</TooltipContent>
</Tooltip>
</div>
);
} else {
return (