IO-868 IO-706 Unique vendor & employee names.
This commit is contained in:
@@ -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 } }) {
|
||||
|
||||
@@ -21,6 +21,18 @@ export const QUERY_VENDOR_BY_ID = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const CHECK_VENDOR_NAME = gql`
|
||||
query CHECK_VENDOR_NAME($name: String!) {
|
||||
vendors_aggregate(where: { name: { _ilike: $name } }) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_VENDOR = gql`
|
||||
mutation UPDATE_VENDOR($id: uuid!, $vendor: vendors_set_input!) {
|
||||
|
||||
Reference in New Issue
Block a user