end cleaning
This commit is contained in:
@@ -5,7 +5,6 @@ import { Button } from '@/components/ui/Button';
|
||||
import { Input } from '@/components/ui/Input';
|
||||
import { Select } from '@/components/ui/Select';
|
||||
import { Textarea } from '@/components/ui/Textarea';
|
||||
import { cn } from '@/utils/utils';
|
||||
|
||||
interface NewTicketWidgetProps {
|
||||
onCancel: () => void;
|
||||
@@ -22,6 +21,7 @@ export const NewTicketWidget: React.FC<NewTicketWidgetProps> = ({ onCancel, onSu
|
||||
const [affectedAsset, setAffectedAsset] = useState('');
|
||||
const [incidentTime, setIncidentTime] = useState('');
|
||||
const [description, setDescription] = useState('');
|
||||
const [buttonVariant, setButtonVariant]=useState('primary');
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
@@ -39,7 +39,7 @@ export const NewTicketWidget: React.FC<NewTicketWidgetProps> = ({ onCancel, onSu
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader className="bg-slate-50 border-b border-slate-100">
|
||||
<CardHeader>
|
||||
<h1 className="text-xl font-bold text-slate-900 tracking-tight">Ouvrir un nouveau ticket</h1>
|
||||
<p className="text-sm text-slate-500 mt-0.5">Qualification de votre requête ITSM</p>
|
||||
</CardHeader>
|
||||
@@ -62,7 +62,7 @@ export const NewTicketWidget: React.FC<NewTicketWidgetProps> = ({ onCancel, onSu
|
||||
<Select
|
||||
label="Type de demande"
|
||||
value={category}
|
||||
onChange={(e) => setCategory(e.target.value as any)}
|
||||
onChange={(e) => {setCategory(e.target.value as any); setButtonVariant(e.target.value==="Incident Critique"?"danger":"primary")}}
|
||||
options={[
|
||||
{ value: 'Incident Critique', label: 'Incident Critique (Panne, Dégradation)' },
|
||||
{ value: 'Évolution', label: 'Évolution (Ajout de ressources, Modification)' },
|
||||
@@ -143,11 +143,7 @@ export const NewTicketWidget: React.FC<NewTicketWidgetProps> = ({ onCancel, onSu
|
||||
<Button
|
||||
type="submit"
|
||||
isLoading={isSubmitting}
|
||||
className={cn(
|
||||
category === 'Incident Critique'
|
||||
? "bg-red-600 hover:bg-red-700 focus:ring-red-600"
|
||||
: ""
|
||||
)}
|
||||
variant={buttonVariant}
|
||||
>
|
||||
Soumettre le ticket
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user