feautre/IO-3377-Add-Notification-Tone-For-Messaging - Complete

This commit is contained in:
Dave
2025-09-24 12:02:20 -04:00
parent 33579c3e6a
commit dfd88308e0
17 changed files with 404 additions and 95 deletions

View File

@@ -5,6 +5,7 @@ export const QUERY_SHOP_ASSOCIATIONS = gql`
associations(where: { shopid: { _eq: $shopid } }) {
id
authlevel
new_message_sound
shopid
user {
email
@@ -28,6 +29,26 @@ export const UPDATE_ASSOCIATION = gql`
}
`;
// Query to load the active association for a given user and get the new_message_sound flag
export const QUERY_ACTIVE_ASSOCIATION_SOUND = gql`
query QUERY_ACTIVE_ASSOCIATION_SOUND($email: String!) {
associations(where: { _and: { useremail: { _eq: $email }, active: { _eq: true } } }) {
id
new_message_sound
}
}
`;
// Mutation to update just the new_message_sound field
export const UPDATE_NEW_MESSAGE_SOUND = gql`
mutation UPDATE_NEW_MESSAGE_SOUND($id: uuid!, $value: Boolean) {
update_associations_by_pk(pk_columns: { id: $id }, _set: { new_message_sound: $value }) {
id
new_message_sound
}
}
`;
export const INSERT_EULA_ACCEPTANCE = gql`
mutation INSERT_EULA_ACCEPTANCE($eulaAcceptance: eula_acceptances_insert_input!) {
insert_eula_acceptances_one(object: $eulaAcceptance) {
@@ -77,6 +98,7 @@ export const QUERY_KANBAN_SETTINGS = gql`
}
}
`;
export const UPDATE_KANBAN_SETTINGS = gql`
mutation UPDATE_KANBAN_SETTINGS($id: uuid!, $ks: jsonb) {
update_associations_by_pk(pk_columns: { id: $id }, _set: { kanban_settings: $ks }) {