diff --git a/components/BerthInfoSentStatusBadge.vue b/components/BerthInfoSentStatusBadge.vue new file mode 100644 index 0000000..d89913b --- /dev/null +++ b/components/BerthInfoSentStatusBadge.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/components/ContractSentStatusBadge.vue b/components/ContractSentStatusBadge.vue new file mode 100644 index 0000000..c8d3c6f --- /dev/null +++ b/components/ContractSentStatusBadge.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/components/ContractStatusBadge.vue b/components/ContractStatusBadge.vue new file mode 100644 index 0000000..3f40015 --- /dev/null +++ b/components/ContractStatusBadge.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/components/CreateInterestModal.vue b/components/CreateInterestModal.vue index fca2424..a6df5c6 100644 --- a/components/CreateInterestModal.vue +++ b/components/CreateInterestModal.vue @@ -1,229 +1,309 @@ @@ -235,6 +315,11 @@ import { InterestSalesProcessLevelFlow, InterestLeadCategoryFlow, ContactMethodPreferredFlow, + EOIStatusFlow, + BerthInfoSentStatusFlow, + ContractSentStatusFlow, + Deposit10PercentStatusFlow, + ContractStatusFlow, } from "@/utils/types"; interface Props { @@ -249,6 +334,7 @@ interface Emits { const props = defineProps(); const emit = defineEmits(); +const { mobile } = useDisplay(); const user = useDirectusUser(); const toast = useToast(); @@ -277,6 +363,11 @@ const getInitialInterest = () => ({ "Extra Comments": "", "Date Added": new Date().toLocaleDateString("en-GB").replace(/\//g, "-"), "Created At": new Date().toLocaleDateString("en-GB").replace(/\//g, "-"), + "EOI Status": "Awaiting Further Details", + "Berth Info Sent Status": "Pending", + "Contract Sent Status": "Pending", + "Deposit 10% Status": "Awaiting Further Details", + "Contract Status": "Pending", }); // New interest data @@ -339,9 +430,3 @@ const createInterest = async () => { } }; - - diff --git a/components/Deposit10PercentStatusBadge.vue b/components/Deposit10PercentStatusBadge.vue new file mode 100644 index 0000000..f69e95f --- /dev/null +++ b/components/Deposit10PercentStatusBadge.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/components/EOIStatusBadge.vue b/components/EOIStatusBadge.vue new file mode 100644 index 0000000..1d767de --- /dev/null +++ b/components/EOIStatusBadge.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/components/InterestDetailsModal.vue b/components/InterestDetailsModal.vue index ad42e17..357077d 100644 --- a/components/InterestDetailsModal.vue +++ b/components/InterestDetailsModal.vue @@ -362,6 +362,72 @@ + + + + mdi-progress-check + Process Status + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -433,6 +499,11 @@ import { InterestSalesProcessLevelFlow, InterestLeadCategoryFlow, ContactMethodPreferredFlow, + EOIStatusFlow, + BerthInfoSentStatusFlow, + ContractSentStatusFlow, + Deposit10PercentStatusFlow, + ContractStatusFlow, } from "@/utils/types"; interface Props { diff --git a/pages/dashboard/interest-list.vue b/pages/dashboard/interest-list.vue index 5178981..c343fad 100644 --- a/pages/dashboard/interest-list.vue +++ b/pages/dashboard/interest-list.vue @@ -125,13 +125,6 @@ - -
- mdi-sail-boat - {{ item["Yacht Name"] }} -
- - -
- mdi-phone - {{ item["Phone Number"] }} -
+ + + + + + + + + + + + + + + + + @@ -177,7 +198,7 @@ {{ item["Extra Comments"] }} - + @@ -207,6 +228,11 @@ import LeadCategoryBadge from "~/components/LeadCategoryBadge.vue"; import InterestSalesBadge from "~/components/InterestSalesBadge.vue"; import InterestDetailsModal from "~/components/InterestDetailsModal.vue"; import CreateInterestModal from "~/components/CreateInterestModal.vue"; +import EOIStatusBadge from "~/components/EOIStatusBadge.vue"; +import BerthInfoSentStatusBadge from "~/components/BerthInfoSentStatusBadge.vue"; +import ContractSentStatusBadge from "~/components/ContractSentStatusBadge.vue"; +import Deposit10PercentStatusBadge from "~/components/Deposit10PercentStatusBadge.vue"; +import ContractStatusBadge from "~/components/ContractStatusBadge.vue"; import { useFetch } from "#app"; import { ref, computed } from "vue"; import type { Interest } from "@/utils/types"; @@ -258,14 +284,17 @@ const handleInterestCreated = async (interest: Interest) => { }; const headers = [ - { title: "Contact", key: "Full Name", sortable: true, width: "25%" }, - { title: "Yacht", key: "Yacht Name", sortable: true }, + { title: "Contact", key: "Full Name", sortable: true, width: "20%" }, { title: "Berth", key: "Berth Number", sortable: true }, - { title: "Status", key: "Sales Process Level", sortable: true }, - { title: "Phone", key: "Phone Number", sortable: false }, + { title: "Sales Status", key: "Sales Process Level", sortable: true }, + { title: "EOI Status", key: "EOI Status", sortable: true }, + { title: "Berth Info", key: "Berth Info Sent Status", sortable: true }, + { title: "Contract Sent", key: "Contract Sent Status", sortable: true }, + { title: "Deposit 10%", key: "Deposit 10% Status", sortable: true }, + { title: "Contract", key: "Contract Status", sortable: true }, { title: "Category", key: "Lead Category", sortable: true }, { title: "Created", key: "Created At", sortable: true }, - { title: "Notes", key: "Extra Comments", sortable: false }, + { title: "", key: "Extra Comments", sortable: false }, ]; const formatDate = (dateString: string) => { diff --git a/pages/dashboard/interest-status.vue b/pages/dashboard/interest-status.vue index b49d4bb..934fc1e 100644 --- a/pages/dashboard/interest-status.vue +++ b/pages/dashboard/interest-status.vue @@ -297,7 +297,7 @@ const getColumnIcon = (level: string) => { 'General Qualified Interest': 'mdi-account-search', 'Specific Qualified Interest': 'mdi-account-check', 'LOI and NDA Sent': 'mdi-email-send', - 'Signed LOI and NDA': 'mdi-file-sign', + 'Signed LOI and NDA': 'mdi-file-check', 'Made Reservation': 'mdi-calendar-check', 'Contract Negotiation': 'mdi-handshake', 'Contract Negotiations Finalized': 'mdi-file-document-check', @@ -406,7 +406,7 @@ const handleDrop = async (event: DragEvent, targetLevel: string) => { const response = await $fetch('/api/update-interest', { method: 'POST', headers: { - 'x-tag': user.value?.email ? "094ut234" : "pjnvü1230" + 'x-tag': user.value?.email ? "094ut234" : "pjnvü1230", }, body: { id: interestId, diff --git a/server/utils/nocodb.ts b/server/utils/nocodb.ts index d4d8cff..cb34cdc 100644 --- a/server/utils/nocodb.ts +++ b/server/utils/nocodb.ts @@ -69,6 +69,11 @@ export const updateInterest = async (id: string, data: Partial) => { "Request More Info - To Sales", "EOI Send to Sales", "Time LOI Sent", + "EOI Status", + "Berth Info Sent Status", + "Contract Sent Status", + "Deposit 10% Status", + "Contract Status", ]; // Filter the data to only include allowed fields @@ -112,6 +117,11 @@ export const createInterest = async (data: Partial) => { "Place of Residence", "Contact Method Preferred", "Lead Category", + "EOI Status", + "Berth Info Sent Status", + "Contract Sent Status", + "Deposit 10% Status", + "Contract Status", ]; // Filter the data to only include allowed fields diff --git a/utils/types.ts b/utils/types.ts index 0082f41..e888f3c 100644 --- a/utils/types.ts +++ b/utils/types.ts @@ -62,6 +62,26 @@ export type ContactMethodPreferred = "Email" | "Phone"; export const ContactMethodPreferredFlow = ["Email", "Phone"]; +export type EOIStatus = "Awaiting Further Details" | "Signed"; + +export const EOIStatusFlow = ["Awaiting Further Details", "Signed"]; + +export type BerthInfoSentStatus = "Pending" | "Yes"; + +export const BerthInfoSentStatusFlow = ["Pending", "Yes"]; + +export type ContractSentStatus = "Pending" | "Yes"; + +export const ContractSentStatusFlow = ["Pending", "Yes"]; + +export type Deposit10PercentStatus = "Awaiting Further Details" | "Pending" | "Received"; + +export const Deposit10PercentStatusFlow = ["Awaiting Further Details", "Pending", "Received"]; + +export type ContractStatus = "Pending" | "40% Received" | "Complete"; + +export const ContractStatusFlow = ["Pending", "40% Received", "Complete"]; + export interface Interest { Id: number; "Full Name": string; @@ -94,6 +114,11 @@ export interface Interest { "EOI Send to Sales": string; "Time LOI Sent": string; Berths: number; + "EOI Status": EOIStatus; + "Berth Info Sent Status": BerthInfoSentStatus; + "Contract Sent Status": ContractSentStatus; + "Deposit 10% Status": Deposit10PercentStatus; + "Contract Status": ContractStatus; } export interface InterestsResponse {