IO-868 IO-706 Unique vendor & employee names.

This commit is contained in:
Patrick Fic
2021-04-09 11:03:40 -07:00
parent bb83894e37
commit 136541b291
13 changed files with 334 additions and 2 deletions

View File

@@ -18,6 +18,21 @@ export const QUERY_EMPLOYEES = gql`
}
`;
export const CHECK_EMPLOYEE_NUMBER = gql`
query CHECK_EMPLOYEE_NUMBER($employeenumber: String!) {
employees_aggregate(
where: { employee_number: { _ilike: $employeenumber } }
) {
aggregate {
count
}
nodes {
id
}
}
}
`;
export const QUERY_ACTIVE_EMPLOYEES = gql`
query QUERY_ACTIVE_EMPLOYEES {
employees(where: { active: { _eq: true } }) {