IO-134 Limit shop uploads based on plan.

This commit is contained in:
Patrick Fic
2021-04-05 16:57:44 -07:00
parent e3b0aba892
commit 50581c98e0
25 changed files with 671 additions and 17 deletions

View File

@@ -81,6 +81,7 @@ export const QUERY_BODYSHOP = gql`
md_payment_types
md_hour_split
sub_status
jobsizelimit
employees {
id
first_name
@@ -160,6 +161,7 @@ export const UPDATE_SHOP = gql`
md_payment_types
md_hour_split
sub_status
jobsizelimit
employees {
id
first_name

View File

@@ -2,15 +2,18 @@ import { gql } from "@apollo/client";
export const GET_DOCUMENTS_BY_JOB = gql`
query GET_DOCUMENTS_BY_JOB($jobId: uuid!) {
documents(
where: { jobid: { _eq: $jobId } }
order_by: { updated_at: desc }
) {
documents_aggregate(where: { jobid: { _eq: $jobId } }) {
aggregate {
sum {
size
}
}
}
documents(order_by: { updated_at: desc }) {
id
name
key
type
extension
bill {
id
invoice_number