Refactored onsite meeting to bids all over the codebase.
This commit is contained in:
parent
6e2535763f
commit
080d9ff1b4
6 changed files with 48 additions and 49 deletions
|
|
@ -54,9 +54,9 @@ const createButtons = ref([
|
|||
},
|
||||
},
|
||||
{
|
||||
label: "On-Site Meeting",
|
||||
label: "Bid",
|
||||
command: () => {
|
||||
router.push("/schedule-onsite?new=true");
|
||||
router.push("/schedule-bid?new=true");
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -102,10 +102,9 @@ const categories = ref([
|
|||
{
|
||||
name: "Clients",
|
||||
icon: Community,
|
||||
//url: "/clients"
|
||||
buttons: clientButtons,
|
||||
},
|
||||
{ name: "Bids", icon: Neighbourhood, url: "/schedule-onsite" },
|
||||
{ name: "Bids", icon: Neighbourhood, url: "/schedule-bid" },
|
||||
{ name: "Estimates", icon: Calculator, url: "/estimates" },
|
||||
{ name: "Jobs", icon: Hammer, url: "/jobs" },
|
||||
{ name: "Payments/Invoices", icon: ReceiveDollars, url: "/invoices" },
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
@confirm="handleConfirm"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<template #title>Schedule New On-Site Meeting</template>
|
||||
<template #title>Schedule New Bid Meeting</template>
|
||||
<div class="new-meeting-form">
|
||||
<div class="form-group">
|
||||
<label for="meeting-address">Address: <span class="required">*</span></label>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="schedule-onsite-container">
|
||||
<div class="schedule-bid-container">
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<h2>On-Site Meeting Schedule</h2>
|
||||
<h2>Bid Schedule</h2>
|
||||
<div class="header-controls">
|
||||
<v-btn
|
||||
@click="previousWeek"
|
||||
|
|
@ -202,7 +202,7 @@
|
|||
/>
|
||||
|
||||
<!-- New Meeting Modal -->
|
||||
<OnSiteMeetingModal
|
||||
<BidMeetingModal
|
||||
v-model:visible="showNewMeetingModal"
|
||||
:initial-address="queryAddress"
|
||||
@confirm="handleNewMeetingConfirm"
|
||||
|
|
@ -214,7 +214,7 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import OnSiteMeetingModal from "../modals/OnSiteMeetingModal.vue";
|
||||
import BidMeetingModal from "../modals/BidMeetingModal.vue";
|
||||
import MeetingDetailsModal from "../modals/MeetingDetailsModal.vue";
|
||||
import { useLoadingStore } from "../../stores/loading";
|
||||
import { useNotificationStore } from "../../stores/notifications-primevue";
|
||||
|
|
@ -470,7 +470,7 @@ const handleNewMeetingConfirm = async (meetingData) => {
|
|||
loadingStore.setLoading(true);
|
||||
|
||||
// Create the meeting via API
|
||||
const result = await Api.createOnSiteMeeting(meetingData.address, meetingData.notes || "");
|
||||
const result = await Api.createBidMeeting(meetingData.address, meetingData.notes || "");
|
||||
|
||||
showNewMeetingModal.value = false;
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ const handleNewMeetingCancel = () => {
|
|||
showNewMeetingModal.value = false;
|
||||
// Clear query params after canceling
|
||||
router.push({
|
||||
path: "/schedule-onsite",
|
||||
path: "/schedule-bid",
|
||||
query: {
|
||||
date: formatDateForUrl(currentWeekStart.value),
|
||||
},
|
||||
|
|
@ -665,7 +665,7 @@ const handleDrop = async (event, date, time) => {
|
|||
status: "Scheduled",
|
||||
};
|
||||
|
||||
await Api.updateOnSiteMeeting(droppedMeeting.id, updateData);
|
||||
await Api.updateBidMeeting(droppedMeeting.id, updateData);
|
||||
|
||||
// If this was a reschedule, remove the old meeting from its original position
|
||||
if (droppedMeeting.isRescheduling && originalMeeting) {
|
||||
|
|
@ -755,7 +755,7 @@ const handleDropToUnscheduled = async (event) => {
|
|||
try {
|
||||
loadingStore.setLoading(true);
|
||||
|
||||
await Api.updateOnSiteMeeting(droppedMeeting.id, {
|
||||
await Api.updateBidMeeting(droppedMeeting.id, {
|
||||
status: "Unscheduled",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
|
|
@ -801,7 +801,7 @@ const handleDropToUnscheduled = async (event) => {
|
|||
const loadUnscheduledMeetings = async () => {
|
||||
loadingStore.setLoading(true);
|
||||
try {
|
||||
const result = await Api.getUnscheduledOnSiteMeetings();
|
||||
const result = await Api.getUnscheduledBidMeetings();
|
||||
// Ensure we always have an array
|
||||
unscheduledMeetings.value = Array.isArray(result) ? result : [];
|
||||
console.log("Loaded unscheduled meetings:", unscheduledMeetings.value);
|
||||
|
|
@ -850,7 +850,7 @@ const loadWeekMeetings = async () => {
|
|||
|
||||
// Try to get meetings from API
|
||||
try {
|
||||
const apiResult = await Api.getWeekOnSiteMeetings(weekStartStr, weekEndStr);
|
||||
const apiResult = await Api.getWeekBidMeetings(weekStartStr, weekEndStr);
|
||||
if (Array.isArray(apiResult)) {
|
||||
// Transform the API data to match what the calendar expects
|
||||
meetings.value = apiResult
|
||||
|
|
@ -989,7 +989,7 @@ watch(
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.schedule-onsite-container {
|
||||
.schedule-bid-container {
|
||||
padding: 20px;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
Loading…
Add table
Add a link
Reference in a new issue