no-mistakes(review): Extend legacy self-heal rename; clear stale Mould & Damp priority default
This commit is contained in:
@@ -111,19 +111,19 @@
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Priority</label>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-2">
|
||||
<label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-gray-50" :class="form.priority === 'urgent' ? 'border-red-500 bg-red-50' : 'border-gray-200'">
|
||||
<input type="radio" name="priority" value="urgent" x-model="form.priority" class="sr-only">
|
||||
<input type="radio" name="priority" value="urgent" x-model="form.priority" @change="priorityAuto = false" class="sr-only">
|
||||
<span class="text-sm">🔴 Urgent</span>
|
||||
</label>
|
||||
<label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-gray-50" :class="form.priority === 'high' ? 'border-orange-500 bg-orange-50' : 'border-gray-200'">
|
||||
<input type="radio" name="priority" value="high" x-model="form.priority" class="sr-only">
|
||||
<input type="radio" name="priority" value="high" x-model="form.priority" @change="priorityAuto = false" class="sr-only">
|
||||
<span class="text-sm">🟠 High</span>
|
||||
</label>
|
||||
<label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-gray-50" :class="form.priority === 'medium' ? 'border-yellow-500 bg-yellow-50' : 'border-gray-200'">
|
||||
<input type="radio" name="priority" value="medium" x-model="form.priority" class="sr-only">
|
||||
<input type="radio" name="priority" value="medium" x-model="form.priority" @change="priorityAuto = false" class="sr-only">
|
||||
<span class="text-sm">🟡 Medium</span>
|
||||
</label>
|
||||
<label class="flex items-center p-3 border rounded-lg cursor-pointer hover:bg-gray-50" :class="form.priority === 'low' ? 'border-green-500 bg-green-50' : 'border-gray-200'">
|
||||
<input type="radio" name="priority" value="low" x-model="form.priority" class="sr-only">
|
||||
<input type="radio" name="priority" value="low" x-model="form.priority" @change="priorityAuto = false" class="sr-only">
|
||||
<span class="text-sm">🟢 Low</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -207,6 +207,7 @@
|
||||
reporter: '',
|
||||
reported_via: ''
|
||||
},
|
||||
priorityAuto: false,
|
||||
categories: [],
|
||||
subCategories: [],
|
||||
unitGroups: {},
|
||||
@@ -237,6 +238,7 @@
|
||||
} else {
|
||||
this.form.priority = '';
|
||||
}
|
||||
this.priorityAuto = false;
|
||||
this.loadCategories();
|
||||
},
|
||||
|
||||
@@ -319,8 +321,16 @@
|
||||
'Aluminum/Glass': 'Windows, doors, sliding/fixed panels, glass and mirror replacement.'
|
||||
};
|
||||
if (parent?.name && hints[parent.name]) this.selectedCategoryHint = hints[parent.name];
|
||||
// Mould & Damp defaults to Medium priority
|
||||
if (parent?.name === 'Mould & Damp' && !this.form.priority) this.form.priority = 'medium';
|
||||
// Mould & Damp defaults to Medium priority; clear the auto-default
|
||||
// when switching away so a non-Mould ticket doesn't keep it silently
|
||||
if (parent?.name !== 'Mould & Damp' && this.priorityAuto) {
|
||||
this.form.priority = '';
|
||||
this.priorityAuto = false;
|
||||
}
|
||||
if (parent?.name === 'Mould & Damp' && !this.form.priority) {
|
||||
this.form.priority = 'medium';
|
||||
this.priorityAuto = true;
|
||||
}
|
||||
},
|
||||
|
||||
handlePhotos(e) {
|
||||
|
||||
Reference in New Issue
Block a user