update calendar functionality and holidays
This commit is contained in:
parent
0620060066
commit
7395d3e048
9 changed files with 859 additions and 440 deletions
|
|
@ -47,7 +47,11 @@ const FRAPPE_GET_CLIENT_TABLE_DATA_METHOD = "custom_ui.api.db.clients.get_client
|
|||
const FRAPPE_GET_CLIENT_TABLE_DATA_V2_METHOD = "custom_ui.api.db.clients.get_clients_table_data_v2";
|
||||
const FRAPPE_GET_CLIENT_METHOD = "custom_ui.api.db.clients.get_client_v2";
|
||||
const FRAPPE_GET_CLIENT_NAMES_METHOD = "custom_ui.api.db.clients.get_client_names";
|
||||
|
||||
// Employee methods
|
||||
const FRAPPE_GET_EMPLOYEES_METHOD = "custom_ui.api.db.employees.get_employees";
|
||||
const FRAPPE_GET_EMPLOYEES_ORGANIZED_METHOD = "custom_ui.api.db.employees.get_employees_organized";
|
||||
// Other methods
|
||||
const FRAPPE_GET_WEEK_HOLIDAYS_METHOD = "custom_ui.api.db.general.get_week_holidays";
|
||||
class Api {
|
||||
// ============================================================================
|
||||
// CORE REQUEST METHOPD
|
||||
|
|
@ -589,6 +593,26 @@ class Api {
|
|||
return data;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// EMPLOYEE METHODS
|
||||
// ============================================================================
|
||||
|
||||
static async getEmployees(company, roles = []) {
|
||||
return await this.request(FRAPPE_GET_EMPLOYEES_METHOD, { company, roles });
|
||||
}
|
||||
|
||||
static async getEmployeesOrganized (company, roles = []) {
|
||||
return await this.request(FRAPPE_GET_EMPLOYEES_ORGANIZED_METHOD, { company, roles });
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// OTHER METHODS
|
||||
// ============================================================================
|
||||
|
||||
static async getWeekHolidays(startDate) {
|
||||
return await this.request(FRAPPE_GET_WEEK_HOLIDAYS_METHOD, { weekStartDate: startDate });
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// GENERIC DOCTYPE METHODS
|
||||
// ============================================================================
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="calendar-navigation">
|
||||
<Tabs value="0">
|
||||
<Tabs value="0" v-if="companyStore.currentCompany == 'Sprinklers Northwest'">
|
||||
<TabList>
|
||||
<Tab value="0">Bids</Tab>
|
||||
<Tab value="1">Projects</Tab>
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
<TabPanel header="Bids" value="0">
|
||||
<ScheduleBid />
|
||||
</TabPanel>
|
||||
<TabPanel header="Install" value="1">
|
||||
<InstallsCalendar />
|
||||
<TabPanel header="Projects" value="1">
|
||||
<SNWProjectCalendar />
|
||||
</TabPanel>
|
||||
<TabPanel header="Service" value="2">
|
||||
<div class="coming-soon">
|
||||
|
|
@ -26,6 +26,9 @@
|
|||
</TabPanel>
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
<div v-else class="coming-soon">
|
||||
<p>Calendar feature coming soon!</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -38,10 +41,12 @@ import TabPanel from 'primevue/tabpanel';
|
|||
import TabPanels from 'primevue/tabpanels';
|
||||
import ScheduleBid from '../calendar/bids/ScheduleBid.vue';
|
||||
import JobsCalendar from '../calendar/jobs/JobsCalendar.vue';
|
||||
import InstallsCalendar from './jobs/ProjectsCalendar.vue';
|
||||
import SNWProjectCalendar from './jobs/SNWProjectCalendar.vue';
|
||||
import { useNotificationStore } from '../../stores/notifications-primevue';
|
||||
import { useCompanyStore } from '../../stores/company';
|
||||
|
||||
const notifications = useNotificationStore();
|
||||
const companyStore = useCompanyStore();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue