IO-1612 Add employee vacation tracking.
This commit is contained in:
@@ -3,6 +3,17 @@ import { gql } from "@apollo/client";
|
||||
export const QUERY_EMPLOYEES = gql`
|
||||
query QUERY_EMPLOYEES {
|
||||
employees(order_by: { employee_number: asc }) {
|
||||
last_name
|
||||
id
|
||||
first_name
|
||||
flat_rate
|
||||
employee_number
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_EMPLOYEE_BY_ID = gql`
|
||||
query QUERY_EMPLOYEE_BY_ID($id: uuid!) {
|
||||
employees_by_pk(id: $id) {
|
||||
last_name
|
||||
id
|
||||
first_name
|
||||
@@ -14,6 +25,11 @@ export const QUERY_EMPLOYEES = gql`
|
||||
rates
|
||||
pin
|
||||
user_email
|
||||
employee_vacations(order_by: { start: desc }) {
|
||||
id
|
||||
start
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -55,7 +71,17 @@ export const INSERT_EMPLOYEES = gql`
|
||||
mutation INSERT_EMPLOYEES($employees: [employees_insert_input!]!) {
|
||||
insert_employees(objects: $employees) {
|
||||
returning {
|
||||
last_name
|
||||
id
|
||||
first_name
|
||||
employee_number
|
||||
active
|
||||
termination_date
|
||||
hire_date
|
||||
flat_rate
|
||||
rates
|
||||
pin
|
||||
user_email
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,3 +124,21 @@ export const QUERY_USERS_BY_EMAIL = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_VACATION = gql`
|
||||
mutation INSERT_VACATION($vacation: employee_vacation_insert_input!) {
|
||||
insert_employee_vacation_one(object: $vacation) {
|
||||
id
|
||||
start
|
||||
end
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_VACATION = gql`
|
||||
mutation DELETE_VACATION($id: uuid!) {
|
||||
delete_employee_vacation_by_pk(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user