payment pages working

This commit is contained in:
Casey 2026-02-06 08:07:18 -06:00
parent 991038bc47
commit 91783757e4
12 changed files with 402 additions and 18 deletions

View file

@ -17,6 +17,12 @@
<span class="date-text">{{ weekDisplayText }}</span>
<v-icon right size="small">mdi-calendar</v-icon>
</v-btn>
<v-btn
@click="nextWeek"
icon="mdi-chevron-right"
variant="outlined"
size="small"
></v-btn>
<v-btn @click="goToThisWeek" variant="outlined" size="small" class="ml-4">
This Week
</v-btn>
@ -991,13 +997,14 @@ const handleDrop = async (event, foremanId, date) => {
await Api.updateServiceAppointmentScheduledDates(
draggedService.value.name,
date,
draggedService.value.expectedEndDate, // Keep the same end date
date, // Reset to single day when moved
foreman.name
);
// Update the scheduled job
scheduledServices.value[scheduledIndex] = {
...scheduledServices.value[scheduledIndex],
expectedStartDate: date,
expectedEndDate: date, // Reset to single day
foreman: foreman.name
};
notifications.addSuccess("Job moved successfully!");
@ -1174,9 +1181,10 @@ const handleResize = (event) => {
// Calculate proposed end date by adding days to the CURRENT end date
let proposedEndDate = addDays(currentEndDate, daysToAdd);
// Don't allow shrinking before the current end date (minimum stay at current)
if (daysToAdd < 0) {
proposedEndDate = currentEndDate;
// Don't allow shrinking before the start date
const startDate = resizingJob.value.expectedStartDate;
if (parseLocalDate(proposedEndDate) < parseLocalDate(startDate)) {
proposedEndDate = startDate;
}
let newEndDate = proposedEndDate;
@ -1306,13 +1314,14 @@ const fetchServiceAppointments = async (currentDate) => {
{
"expectedStartDate": ["<=", endDate],
"expectedEndDate": [">=", startDate],
"status": ["not in", ["Canceled"]]
"status": ["not in", ["Canceled", "Open"]]
}
);
unscheduledServices.value = await Api.getServiceAppointments(
[companyStore.currentCompany],
{
"status": "Open"
"status": "Open",
"ready_to_schedule": 1
}
);