correct issue data

This commit is contained in:
2025-06-22 23:36:20 +08:00
parent db85b92274
commit bc6839ca07
2 changed files with 430 additions and 390 deletions

View File

@@ -10,48 +10,78 @@
{ label: "Critical", value: "Critical" },
];
const issueSource = [
{ label: "Email", value: "Email" },
{ label: "Phone Call", value: "Phone Call" },
{ label: "In-Person", value: "In-Person" },
{ label: "Online Form", value: "Online Form" },
{ label: "Other", value: "Other" },
{ label: "Guest Assistant", value: "Guest Assistant" },
{ label: "Villa Attendant", value: "Villa Attendant" },
{ label: "Villa Supervisor", value: "Villa Supervisor" },
{ label: "Villa Manager", value: "Villa Manager" },
{ label: "Operation Manager", value: "Operation Manager" },
{ label: "Quality Control Manager", value: "Quality Control Manager" },
{ label: "Owner", value: "Owner" },
{ label: "Sales/Reservations", value: "Sales/Reservations" },
{ label: "Guest", value: "Guest" },
{ label: "Agent", value: "Agent" },
];
const issueTypes = [
{ label: "Facilities - Light", value: "Facilities - Light" },
{ label: "Facilities - Air Conditioner", value: "Facilities - Air Conditioner" },
{ label: "Facilities - Appliances", value: "Facilities - Appliances" },
{ label: "Facilities - Baby Cot", value: "Facilities - Baby Cot" },
{ label: "Facilities - Bath", value: "Facilities - Bath" },
{ label: "Facilities - Bed", value: "Facilities - Bed" },
{ label: "Facilities - Blender", value: "Facilities - Blender" },
{ label: "Facilities - Cabinet", value: "Facilities - Cabinet" },
{ label: "Facilities - Cable TV", value: "Facilities - Cable TV" },
{ label: "Facilities - CCTV", value: "Facilities - CCTV" },
{ label: "Facilities - Ceiling Fans", value: "Facilities - Ceiling Fans" },
{ label: "Facilities - Coffee Maker", value: "Facilities - Coffee Maker" },
{ label: "Facilities - DVD", value: "Facilities - DVD" },
{ label: "Facilities - Generator", value: "Facilities - Generator" },
{ label: "Facilities - Hairdryer", value: "Facilities - Hairdryer" },
{ label: "Facilities - Home Theatre", value: "Facilities - Home Theatre" },
{ label: "Facilities - Hot Water", value: "Facilities - Hot Water" },
{ label: "Facilities - Internet Connection", value: "Facilities - Internet Connection" },
{ label: "Facilities - Iron/Ironing Board", value: "Facilities - Iron/Ironing Board" },
{ label: "Facilities - Kitchen Equipment", value: "Facilities - Kitchen Equipment" },
{ label: "Facilities - Lights", value: "Facilities - Lights" },
{ label: "Facilities - Linen", value: "Facilities - Linen" },
{ label: "Facilities - Mattress", value: "Facilities - Mattress" },
{ label: "Facilities - Mirror", value: "Facilities - Mirror" },
{ label: "Facilities - Mosquito Net", value: "Facilities - Mosquito Net" },
{ label: "Facilities - Other", value: "Facilities - Other" },
{ label: "Facilities - Towel", value: "Facilities - Towel" },
{ label: "Facilities - Fan", value: "Facilities - Fan" },
{ label: "Cleanliness - Other", value: "Cleanliness - Other" },
{ label: "Cleanliness - Floor", value: "Cleanliness - Floor" },
{ label: "Cleanliness - Kitchen", value: "Cleanliness - Kitchen" },
{ label: "Cleanliness - Bathroom", value: "Cleanliness - Bathroom" },
{
label: "Maintenance - Electrical",
value: "Maintenance - Electrical",
},
{ label: "Facilities - Parking", value: "Facilities - Parking" },
{ label: "Facilities - Pool Umbrella", value: "Facilities - Pool Umbrella" },
{ label: "Facilities - Safe Deposit Box", value: "Facilities - Safe Deposit Box" },
{ label: "Facilities - Security", value: "Facilities - Security" },
{ label: "Facilities - Shower", value: "Facilities - Shower" },
{ label: "Facilities - Sink", value: "Facilities - Sink" },
{ label: "Facilities - Sunbed and Mattress", value: "Facilities - Sunbed and Mattress" },
{ label: "Facilities - Swimming Pool", value: "Facilities - Swimming Pool" },
{ label: "Facilities - Telephone", value: "Facilities - Telephone" },
{ label: "Facilities - Toaster", value: "Facilities - Toaster" },
{ label: "Facilities - Toilet Bowl", value: "Facilities - Toilet Bowl" },
{ label: "Facilities - Toiletries", value: "Facilities - Toiletries" },
{ label: "Facilities - Towels", value: "Facilities - Towels" },
{ label: "Facilities - TV Unit", value: "Facilities - TV Unit" },
{ label: "Facilities - Wardrobe", value: "Facilities - Wardrobe" },
{ label: "Facilities - Wash Basin", value: "Facilities - Wash Basin" },
{ label: "Facilities - Water Dispenser", value: "Facilities - Water Dispenser" },
{ label: "Maintenance - Civil", value: "Maintenance - Civil" },
{ label: "Maintenance - Electrical", value: "Maintenance - Electrical" },
{ label: "Maintenance - Mechanical", value: "Maintenance - Mechanical" },
{ label: "Maintenance - Painting", value: "Maintenance - Painting" },
{ label: "Maintenance - Plumbing", value: "Maintenance - Plumbing" },
{ label: "Maintenance - HVAC", value: "Maintenance - HVAC" },
{
label: "Maintenance - Structural",
value: "Maintenance - Structural",
},
{ label: "Safety Issue", value: "Safety Issue" },
{ label: "Security Concern", value: "Security Concern" },
{ label: "Other", value: "Other" },
{ label: "General Inquiry", value: "General Inquiry" },
{ label: "Feedback", value: "Feedback" },
{ label: "Complaint", value: "Complaint" },
{ label: "Request", value: "Request" },
{ label: "Suggestion", value: "Suggestion" },
{ label: "Booking Issue", value: "Booking Issue" },
{ label: "Payment Issue", value: "Payment Issue" },
{ label: "Cancellation Request", value: "Cancellation Request" },
{ label: "Refund Request", value: "Refund Request" },
{ label: "Reservation Change", value: "Reservation Change" },
{ label: "Check-in Issue", value: "Check-in Issue" },
{ label: "Check-out Issue", value: "Check-out Issue" },
{ label: "Maintenance - Roof", value: "Maintenance - Roof" },
{ label: "Other - Accident", value: "Other - Accident" },
{ label: "Other - Animals", value: "Other - Animals" },
{ label: "Other - Booking", value: "Other - Booking" },
{ label: "Other - Cleanliness", value: "Other - Cleanliness" },
{ label: "Other - Crime", value: "Other - Crime" },
{ label: "Other - Food and Beverage", value: "Other - Food and Beverage" },
{ label: "Other - Garden", value: "Other - Garden" },
{ label: "Other - Inventory", value: "Other - Inventory" },
{ label: "Other - Noise", value: "Other - Noise" },
{ label: "Other - Payment", value: "Other - Payment" },
{ label: "Other - Transport", value: "Other - Transport" },
];
const areaOfVilla = [
@@ -61,51 +91,52 @@
{ label: "All Villa Areas", value: "All Villa Areas" },
{ label: "Balcony", value: "Balcony" },
{ label: "Bathroom (Guest)", value: "Bathroom (Guest)" },
{ label: "Bathroom Guest House 1", value: "Bathroom Guest House 1" },
{ label: "Bathroom Guest House 2", value: "Bathroom Guest House 2" },
{ label: "Bathroom Guest House 3", value: "Bathroom Guest House 3" },
{ label: "Bathroom (Master)", value: "Bathroom (Master)" },
{ label: "Bathroom 1", value: "Bathroom 1" },
{ label: "Bathroom 2", value: "Bathroom 2" },
{ label: "Bathroom 3", value: "Bathroom 3" },
{ label: "Bedroom (Guest)", value: "Bedroom (Guest)" },
{ label: "Bathroom 4", value: "Bathroom 4" },
{ label: "Bathroom 5", value: "Bathroom 5" },
{ label: "BBQ Area", value: "BBQ Area" },
{ label: "Bedroom (Master)", value: "Bedroom (Master)" },
{ label: "Bedroom 1", value: "Bedroom 1" },
{ label: "Bedroom 2", value: "Bedroom 2" },
{ label: "Bedroom 3", value: "Bedroom 3" },
{ label: "Ceiling", value: "Ceiling" },
{ label: "Dining Area", value: "Dining Area" },
{ label: "Door", value: "Door" },
{ label: "Entrance", value: "Entrance" },
{ label: "Bedroom 4", value: "Bedroom 4" },
{ label: "Bedroom 5", value: "Bedroom 5" },
{ label: "Boundary Wall", value: "Boundary Wall" },
{ label: "Carport", value: "Carport" },
{ label: "Dining Room", value: "Dining Room" },
{ label: "Flat Roof", value: "Flat Roof" },
{ label: "Garden", value: "Garden" },
{ label: "General", value: "General" },
{ label: "Glass", value: "Glass" },
{ label: "Hallway", value: "Hallway" },
{ label: "Gate", value: "Gate" },
{ label: "Gazebo", value: "Gazebo" },
{ label: "Generator Room", value: "Generator Room" },
{ label: "Guest House 1", value: "Guest House 1" },
{ label: "Guest House 2", value: "Guest House 2" },
{ label: "Guest House 3", value: "Guest House 3" },
{ label: "Guest House 4", value: "Guest House 4" },
{ label: "Kids Room", value: "Kids Room" },
{ label: "Kitchen", value: "Kitchen" },
{ label: "Laundry Area", value: "Laundry Area" },
{ label: "Landscape", value: "Landscape" },
{ label: "Living Room", value: "Living Room" },
{ label: "Outdoor Area", value: "Outdoor Area" },
{ label: "Parking Area", value: "Parking Area" },
{ label: "Pool Area", value: "Pool Area" },
{ label: "Roof", value: "Roof" },
{ label: "Stairs", value: "Stairs" },
{ label: "Other", value: "Other" },
{ label: "Outdoor Bar", value: "Outdoor Bar" },
{ label: "Outdoor Kitchen", value: "Outdoor Kitchen" },
{ label: "Outdoor Shower", value: "Outdoor Shower" },
{ label: "Outside The Villa", value: "Outside The Villa" },
{ label: "Pool", value: "Pool" },
{ label: "Pump Room", value: "Pump Room" },
{ label: "Staff Room", value: "Staff Room" },
{ label: "Stairs (other)", value: "Stairs (other)" },
{ label: "Stairs (living room)", value: "Stairs (living room)" },
{ label: "Storage", value: "Storage" },
{ label: "Terrace", value: "Terrace" },
{ label: "Toilet", value: "Toilet" },
{ label: "Wall", value: "Wall" },
{ label: "Window", value: "Window" },
{ label: "Others", value: "Others" },
];
const inputBy = [
{ label: "Admin", value: "Admin" },
{ label: "Staff", value: "Staff" },
{ label: "Manager", value: "Manager" },
{ label: "Guest", value: "Guest" },
];
const reportedBy = [
{ label: "Admin", value: "Admin" },
{ label: "Staff", value: "Staff" },
{ label: "Manager", value: "Manager" },
{ label: "Guest", value: "Guest" },
{ label: "Transport", value: "Transport" },
{ label: "TV Room", value: "TV Room" },
{ label: "Water Feature", value: "Water Feature" }
];
type Villa = {
@@ -115,7 +146,7 @@
type User = {
id: string;
full_name: string;
employee_name: string;
};
let dataVilla: Villa[] = [];
@@ -124,7 +155,8 @@
onMount(async () => {
const { data, error } = await supabase
.from("vb_villas")
.select("id, villa_name");
.select("id, villa_name, villa_status")
.eq("villa_status", "Active");
if (error) {
console.error("Error fetching villas:", error);
@@ -133,8 +165,9 @@
}
const { data: userData, error: userError } = await supabase
.from("vb_users")
.select("id, full_name");
.from("vb_employee")
.select("id, employee_name, employee_status")
.eq("employee_status", "Active");
if (userError) {
console.error("Error fetching users:", userError);
} else if (userData) {
@@ -144,7 +177,6 @@
type Issue = {
id: string;
name: string;
villa_id: string;
villa_name: string;
area_of_villa: string;
@@ -160,8 +192,6 @@
input_by: string;
guest_communication: string;
resolution: string;
guest_has_aggreed_issue_has_been_resolved: boolean;
follow_up: boolean;
need_approval: boolean;
created_at: string;
updated_by?: string;
@@ -169,7 +199,6 @@
};
type issueInsert = {
name: string;
villa_id: string;
area_of_villa: string;
priority: string;
@@ -182,8 +211,6 @@
input_by: string;
guest_communication: string;
resolution: string;
guest_has_aggreed_issue_has_been_resolved: boolean;
follow_up: boolean;
need_approval: boolean;
};
@@ -199,7 +226,8 @@
};
const columns: columns[] = [
{ key: "name", title: "Name" },
{ key: "description_of_the_issue", title: "Description of The Issue" },
{ key: "issue_number", title: "Issue Number" },
{ key: "villa_name", title: "Villa Name" },
{ key: "villa_id", title: "Villa ID" },
{ key: "input_by", title: "Input By" },
@@ -208,20 +236,13 @@
{ key: "area_of_villa", title: "Area Of Villa" },
{ key: "priority", title: "Priority" },
{ key: "issue_type", title: "Issue Type" },
{ key: "issue_number", title: "Issue Number" },
{ key: "move_issue", title: "Move Issue" },
{ key: "description_of_the_issue", title: "Description of The Issue" },
{ key: "issue_related_image", title: "Issue Related Image" },
{ key: "issue_source", title: "Issue Source" },
{ key: "reported_name", title: "Reported By" },
{ key: "inputed_name", title: "Input By" },
{ key: "guest_communication", title: "Guest Communication" },
{ key: "resolution", title: "Resolution" },
{
key: "guest_has_aggreed_issue_has_been_resolved",
title: "Guest Has Aggred Issue Has Been Resolved",
},
{ key: "follow_up", title: "Follow Up" },
{ key: "resolution", title: "Resolved How?" },
{ key: "need_approval", title: "Need Approval" },
{ key: "created_at", title: "Created At" },
{ key: "updated_name", title: "Updated By" },
@@ -248,7 +269,7 @@
}
if (search) {
query = query.ilike("name", `%${search}%`);
query = query.ilike("description_of_the_issue", `%${search}%`);
}
const { data: issues, error, count } = await query;
@@ -327,7 +348,13 @@
showModal = true;
}
async function saveIssue(event: Event) {
const session = await supabase.auth.getSession();
const userId = session.data.session?.user.id;
newIssue.updated_by = userId;
newIssue.updated_at = new Date().toISOString();
event.preventDefault();
const formData = new FormData(event.target as HTMLFormElement);
@@ -394,7 +421,6 @@
}
} else {
const issueInsert: issueInsert = {
name: formData.get("name") as string,
villa_id: formData.get("villa_id") as string,
area_of_villa: formData.get("area_of_villa") as string,
priority: formData.get("priority") as string,
@@ -413,15 +439,8 @@
"guest_communication",
) as string,
resolution: formData.get("resolution") as string,
guest_has_aggreed_issue_has_been_resolved:
formData.get(
"guest_has_aggreed_issue_has_been_resolved",
) === "true"
? true
: false,
follow_up: formData.get("follow_up") === "true" ? true : false,
need_approval:
formData.get("need_approval") === "true" ? true : false,
formData.get("need_approval") === "false" ? true : false,
};
const { error } = await supabase
@@ -476,7 +495,6 @@
function validateForm(formData: FormData): boolean {
const errors: { [key: string]: string } = {};
const requiredFields = [
"name",
"description_of_the_issue",
"issue_source",
"villa_id",
@@ -633,7 +651,7 @@
<thead class="bg-gray-100">
<tr>
{#each formColumnsDisplay as col}
{#if col.key === "name"}
{#if col.key === "description_of_the_issue"}
<th
class="sticky left-0 px-4 py-3 text-left font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap"
style="background-color: #f0f8ff; z-index: 10;"
@@ -654,7 +672,7 @@
{#each allRows as row}
<tr class="hover:bg-gray-50 transition">
{#each formColumnsDisplay as col}
{#if col.key === "name"}
{#if col.key === "description_of_the_issue"}
<td
class="sticky left-0 px-4 py-2 font-medium text-blue-600"
style="background-color: #f0f8ff; cursor: pointer;"
@@ -853,9 +871,8 @@
{#each formColumns as col}
{#if col.key === "name"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Customer / Guest Name</label
>
<label class="block text-sm font-medium text-gray-700">
Customer / Guest Name
<input
class="w-full border px-3 py-2 rounded {errorClass(
'name',
@@ -871,40 +888,12 @@
{$formErrors.name}
</p>
{/if}
</div>
{:else if col.key === "guest_has_aggreed_issue_has_been_resolved"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Guest Has Aggred Issue Has Been Resolved</label
>
<select
name="guest_has_aggreed_issue_has_been_resolved"
class="w-full border px-3 py-2 rounded"
bind:value={newIssue[col.key as keyof Issue]}
>
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
{:else if col.key === "follow_up"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Follow Up</label
>
<select
name="follow_up"
class="w-full border px-3 py-2 rounded"
bind:value={newIssue[col.key as keyof Issue]}
>
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</label>
</div>
{:else if col.key === "issue_related_image"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700">
Issue Related Image
</label>
<input
name="issue_related_image"
class="w-full border px-3 py-2 rounded"
@@ -931,12 +920,13 @@
/>
{/await}
{/if}
</label>
</div>
{:else if col.key === "reported_date"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Reported Date</label
>
<label class="block text-sm font-medium text-gray-700">
Reported Date
<input
name="reported_date"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -950,12 +940,12 @@
{$formErrors.reported_date}
</p>
{/if}
</label>
</div>
{:else if col.key === "need_approval"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Need Approval</label
>
<label class="block text-sm font-medium text-gray-700">
Need Approval
<select
name="need_approval"
class="w-full border px-3 py-2 rounded"
@@ -964,12 +954,12 @@
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</label>
</div>
{:else if col.key === "issue_source"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Issue Source</label
>
<label class="block text-sm font-medium text-gray-700">
Issue Source
<select
name="issue_source"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -991,12 +981,12 @@
{$formErrors.issue_source}
</p>
{/if}
</label>
</div>
{:else if col.key === "reported_by"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Reported By</label
>
<label class="block text-sm font-medium text-gray-700">
Reported By
<select
name="reported_by"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1004,13 +994,9 @@
)}"
bind:value={newIssue[col.key as keyof Issue]}
>
<option value="" disabled selected
>Select Reporter</option
>
<option value="" disabled selected >Select Reporter</option>
{#each dataUser as reporter}
<option value={reporter.id}
>{reporter.full_name}</option
>
<option value={reporter.id}>{reporter.employee_name}</option>
{/each}
</select>
{#if $formErrors.reported_by}
@@ -1018,12 +1004,13 @@
{$formErrors.reported_by}
</p>
{/if}
</label>
</div>
{:else if col.key === "input_by"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Input By</label
>
<label class="block text-sm font-medium text-gray-700">
Input By
<select
name="input_by"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1036,7 +1023,7 @@
>
{#each dataUser as input}
<option value={input.id}
>{input.full_name}</option
>{input.employee_name}</option
>
{/each}
</select>
@@ -1045,12 +1032,12 @@
{$formErrors.input_by}
</p>
{/if}
</label>
</div>
{:else if col.key === "area_of_villa"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Area of Villa</label
>
<label class="block text-sm font-medium text-gray-700">
Area of Villa
<select
name="area_of_villa"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1070,12 +1057,13 @@
{$formErrors.area_of_villa}
</p>
{/if}
</label>
</div>
{:else if col.key === "issue_type"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Issue Type</label
>
<label class="block text-sm font-medium text-gray-700">
Issue Type
<select
name="issue_type"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1095,12 +1083,13 @@
{$formErrors.issue_type}
</p>
{/if}
</label>
</div>
{:else if col.key === "priority"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Priority</label
>
>Priority
<select
name="priority"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1120,12 +1109,12 @@
{$formErrors.priority}
</p>
{/if}
</label>
</div>
{:else if col.key === "villa_id"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Villa Name</label
>
<label class="block text-sm font-medium text-gray-700">
Villa Name
<select
name="villa_id"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1147,12 +1136,13 @@
{$formErrors.villa_id}
</p>
{/if}
</label>
</div>
{:else if col.key === "description_of_the_issue"}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>Description of The Issue</label
>
<label class="block text-sm font-medium text-gray-700">
Description of The Issue
<textarea
name="description_of_the_issue"
class="w-full border px-3 py-2 rounded {errorClass(
@@ -1167,12 +1157,13 @@
{$formErrors.description_of_the_issue}
</p>
{/if}
</label>
</div>
{:else}
<div class="space-y-1">
<label class="block text-sm font-medium text-gray-700"
>{col.title}</label
>
>{col.title}
<input
name={col.key}
class="w-full border px-3 py-2 rounded"
@@ -1180,6 +1171,8 @@
bind:value={newIssue[col.key as keyof Issue]}
placeholder={col.title}
/>
</label>
</div>
{/if}
{/each}

View File

@@ -25,40 +25,65 @@
];
const issueTypes = [
{ label: "Facilities - Light", value: "Facilities - Light" },
{ label: "Facilities - Air Conditioner", value: "Facilities - Air Conditioner" },
{ label: "Facilities - Appliances", value: "Facilities - Appliances" },
{ label: "Facilities - Baby Cot", value: "Facilities - Baby Cot" },
{ label: "Facilities - Bath", value: "Facilities - Bath" },
{ label: "Facilities - Bed", value: "Facilities - Bed" },
{ label: "Facilities - Blender", value: "Facilities - Blender" },
{ label: "Facilities - Cabinet", value: "Facilities - Cabinet" },
{ label: "Facilities - Cable TV", value: "Facilities - Cable TV" },
{ label: "Facilities - CCTV", value: "Facilities - CCTV" },
{ label: "Facilities - Ceiling Fans", value: "Facilities - Ceiling Fans" },
{ label: "Facilities - Coffee Maker", value: "Facilities - Coffee Maker" },
{ label: "Facilities - DVD", value: "Facilities - DVD" },
{ label: "Facilities - Generator", value: "Facilities - Generator" },
{ label: "Facilities - Hairdryer", value: "Facilities - Hairdryer" },
{ label: "Facilities - Home Theatre", value: "Facilities - Home Theatre" },
{ label: "Facilities - Hot Water", value: "Facilities - Hot Water" },
{ label: "Facilities - Internet Connection", value: "Facilities - Internet Connection" },
{ label: "Facilities - Iron/Ironing Board", value: "Facilities - Iron/Ironing Board" },
{ label: "Facilities - Kitchen Equipment", value: "Facilities - Kitchen Equipment" },
{ label: "Facilities - Lights", value: "Facilities - Lights" },
{ label: "Facilities - Linen", value: "Facilities - Linen" },
{ label: "Facilities - Mattress", value: "Facilities - Mattress" },
{ label: "Facilities - Mirror", value: "Facilities - Mirror" },
{ label: "Facilities - Mosquito Net", value: "Facilities - Mosquito Net" },
{ label: "Facilities - Other", value: "Facilities - Other" },
{ label: "Facilities - Towel", value: "Facilities - Towel" },
{ label: "Facilities - Fan", value: "Facilities - Fan" },
{ label: "Cleanliness - Other", value: "Cleanliness - Other" },
{ label: "Cleanliness - Floor", value: "Cleanliness - Floor" },
{ label: "Cleanliness - Kitchen", value: "Cleanliness - Kitchen" },
{ label: "Cleanliness - Bathroom", value: "Cleanliness - Bathroom" },
{
label: "Maintenance - Electrical",
value: "Maintenance - Electrical",
},
{ label: "Facilities - Parking", value: "Facilities - Parking" },
{ label: "Facilities - Pool Umbrella", value: "Facilities - Pool Umbrella" },
{ label: "Facilities - Safe Deposit Box", value: "Facilities - Safe Deposit Box" },
{ label: "Facilities - Security", value: "Facilities - Security" },
{ label: "Facilities - Shower", value: "Facilities - Shower" },
{ label: "Facilities - Sink", value: "Facilities - Sink" },
{ label: "Facilities - Sunbed and Mattress", value: "Facilities - Sunbed and Mattress" },
{ label: "Facilities - Swimming Pool", value: "Facilities - Swimming Pool" },
{ label: "Facilities - Telephone", value: "Facilities - Telephone" },
{ label: "Facilities - Toaster", value: "Facilities - Toaster" },
{ label: "Facilities - Toilet Bowl", value: "Facilities - Toilet Bowl" },
{ label: "Facilities - Toiletries", value: "Facilities - Toiletries" },
{ label: "Facilities - Towels", value: "Facilities - Towels" },
{ label: "Facilities - TV Unit", value: "Facilities - TV Unit" },
{ label: "Facilities - Wardrobe", value: "Facilities - Wardrobe" },
{ label: "Facilities - Wash Basin", value: "Facilities - Wash Basin" },
{ label: "Facilities - Water Dispenser", value: "Facilities - Water Dispenser" },
{ label: "Maintenance - Civil", value: "Maintenance - Civil" },
{ label: "Maintenance - Electrical", value: "Maintenance - Electrical" },
{ label: "Maintenance - Mechanical", value: "Maintenance - Mechanical" },
{ label: "Maintenance - Painting", value: "Maintenance - Painting" },
{ label: "Maintenance - Plumbing", value: "Maintenance - Plumbing" },
{ label: "Maintenance - HVAC", value: "Maintenance - HVAC" },
{
label: "Maintenance - Structural",
value: "Maintenance - Structural",
},
{ label: "Safety Issue", value: "Safety Issue" },
{ label: "Security Concern", value: "Security Concern" },
{ label: "Other", value: "Other" },
{ label: "General Inquiry", value: "General Inquiry" },
{ label: "Feedback", value: "Feedback" },
{ label: "Complaint", value: "Complaint" },
{ label: "Request", value: "Request" },
{ label: "Suggestion", value: "Suggestion" },
{ label: "Booking Issue", value: "Booking Issue" },
{ label: "Payment Issue", value: "Payment Issue" },
{ label: "Cancellation Request", value: "Cancellation Request" },
{ label: "Refund Request", value: "Refund Request" },
{ label: "Reservation Change", value: "Reservation Change" },
{ label: "Check-in Issue", value: "Check-in Issue" },
{ label: "Check-out Issue", value: "Check-out Issue" },
{ label: "Maintenance - Roof", value: "Maintenance - Roof" },
{ label: "Other - Accident", value: "Other - Accident" },
{ label: "Other - Animals", value: "Other - Animals" },
{ label: "Other - Booking", value: "Other - Booking" },
{ label: "Other - Cleanliness", value: "Other - Cleanliness" },
{ label: "Other - Crime", value: "Other - Crime" },
{ label: "Other - Food and Beverage", value: "Other - Food and Beverage" },
{ label: "Other - Garden", value: "Other - Garden" },
{ label: "Other - Inventory", value: "Other - Inventory" },
{ label: "Other - Noise", value: "Other - Noise" },
{ label: "Other - Payment", value: "Other - Payment" },
{ label: "Other - Transport", value: "Other - Transport" },
];
const areaOfVilla = [
@@ -68,30 +93,52 @@
{ label: "All Villa Areas", value: "All Villa Areas" },
{ label: "Balcony", value: "Balcony" },
{ label: "Bathroom (Guest)", value: "Bathroom (Guest)" },
{ label: "Bathroom Guest House 1", value: "Bathroom Guest House 1" },
{ label: "Bathroom Guest House 2", value: "Bathroom Guest House 2" },
{ label: "Bathroom Guest House 3", value: "Bathroom Guest House 3" },
{ label: "Bathroom (Master)", value: "Bathroom (Master)" },
{ label: "Bathroom 1", value: "Bathroom 1" },
{ label: "Bathroom 2", value: "Bathroom 2" },
{ label: "Bathroom 3", value: "Bathroom 3" },
{ label: "Bedroom (Guest)", value: "Bedroom (Guest)" },
{ label: "Bathroom 4", value: "Bathroom 4" },
{ label: "Bathroom 5", value: "Bathroom 5" },
{ label: "BBQ Area", value: "BBQ Area" },
{ label: "Bedroom (Master)", value: "Bedroom (Master)" },
{ label: "Bedroom 1", value: "Bedroom 1" },
{ label: "Bedroom 2", value: "Bedroom 2" },
{ label: "Bedroom 3", value: "Bedroom 3" },
{ label: "Kids Room", value: "Kids Room" },
{ label: "Bedroom 4", value: "Bedroom 4" },
{ label: "Bedroom 5", value: "Bedroom 5" },
{ label: "Boundary Wall", value: "Boundary Wall" },
{ label: "Carport", value: "Carport" },
{ label: "Dining Room", value: "Dining Room" },
{ label: "Flat Roof", value: "Flat Roof" },
{ label: "Garden", value: "Garden" },
{ label: "Gate", value: "Gate" },
{ label: "Gazebo", value: "Gazebo" },
{ label: "Generator Room", value: "Generator Room" },
{ label: "Guest House 1", value: "Guest House 1" },
{ label: "Guest House 2", value: "Guest House 2" },
{ label: "Guest House 3", value: "Guest House 3" },
{ label: "Guest House 4", value: "Guest House 4" },
{ label: "Kids Room", value: "Kids Room" },
{ label: "Kitchen", value: "Kitchen" },
{ label: "Pump Room", value: "Pump Room" },
{ label: "Landscape", value: "Landscape" },
{ label: "Living Room", value: "Living Room" },
{ label: "Outdoor Area", value: "Outdoor Area" },
{ label: "Parking Area", value: "Parking Area" },
{ label: "Other", value: "Other" },
{ label: "Outdoor Bar", value: "Outdoor Bar" },
{ label: "Outdoor Kitchen", value: "Outdoor Kitchen" },
{ label: "Outdoor Shower", value: "Outdoor Shower" },
{ label: "Outside The Villa", value: "Outside The Villa" },
{ label: "Pool", value: "Pool" },
{ label: "Roof", value: "Roof" },
{ label: "Stairs", value: "Stairs" },
{ label: "Storage", value: "Storage" },
{ label: "Pump Room", value: "Pump Room" },
{ label: "Staff Room", value: "Staff Room" },
{ label: "Stairs (other)", value: "Stairs (other)" },
{ label: "Stairs (living room)", value: "Stairs (living room)" },
{ label: "Storage", value: "Storage" },
{ label: "Transport", value: "Transport" },
{ label: "Window", value: "Window" },
{ label: "Others", value: "Others" },
{ label: "TV Room", value: "TV Room" },
{ label: "Water Feature", value: "Water Feature" }
];
//InputBy & reportedBy should dropdown data from active employee, from table vb_employee (field employee_name and employee_status = 'Active')