Refactored onsite meeting to bids all over the codebase.

This commit is contained in:
rocketdebris 2025-12-10 10:25:37 -05:00
parent 6e2535763f
commit 080d9ff1b4
6 changed files with 48 additions and 49 deletions

View file

@ -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;