Merge outstanding changes before pulling dev
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
mutation createAttireOption(
|
||||
$itemId: String!
|
||||
$label: String!
|
||||
$icon: String
|
||||
$description: String
|
||||
$imageUrl: String
|
||||
$isMandatory: Boolean
|
||||
$vendorId: UUID
|
||||
@@ -10,7 +10,7 @@ mutation createAttireOption(
|
||||
data: {
|
||||
itemId: $itemId
|
||||
label: $label
|
||||
icon: $icon
|
||||
description: $description
|
||||
imageUrl: $imageUrl
|
||||
isMandatory: $isMandatory
|
||||
vendorId: $vendorId
|
||||
@@ -22,7 +22,7 @@ mutation updateAttireOption(
|
||||
$id: UUID!
|
||||
$itemId: String
|
||||
$label: String
|
||||
$icon: String
|
||||
$description: String
|
||||
$imageUrl: String
|
||||
$isMandatory: Boolean
|
||||
$vendorId: UUID
|
||||
@@ -32,7 +32,7 @@ mutation updateAttireOption(
|
||||
data: {
|
||||
itemId: $itemId
|
||||
label: $label
|
||||
icon: $icon
|
||||
description: $description
|
||||
imageUrl: $imageUrl
|
||||
isMandatory: $isMandatory
|
||||
vendorId: $vendorId
|
||||
|
||||
@@ -3,7 +3,7 @@ query listAttireOptions @auth(level: USER) {
|
||||
id
|
||||
itemId
|
||||
label
|
||||
icon
|
||||
description
|
||||
imageUrl
|
||||
isMandatory
|
||||
vendorId
|
||||
@@ -16,7 +16,7 @@ query getAttireOptionById($id: UUID!) @auth(level: USER) {
|
||||
id
|
||||
itemId
|
||||
label
|
||||
icon
|
||||
description
|
||||
imageUrl
|
||||
isMandatory
|
||||
vendorId
|
||||
@@ -39,7 +39,7 @@ query filterAttireOptions(
|
||||
id
|
||||
itemId
|
||||
label
|
||||
icon
|
||||
description
|
||||
imageUrl
|
||||
isMandatory
|
||||
vendorId
|
||||
|
||||
16
backend/dataconnect/connector/staffAttire/mutations.gql
Normal file
16
backend/dataconnect/connector/staffAttire/mutations.gql
Normal file
@@ -0,0 +1,16 @@
|
||||
mutation upsertStaffAttire(
|
||||
$staffId: UUID!
|
||||
$attireOptionId: UUID!
|
||||
$verificationPhotoUrl: String
|
||||
$verificationId: String
|
||||
) @auth(level: USER) {
|
||||
staffAttire_upsert(
|
||||
data: {
|
||||
staffId: $staffId
|
||||
attireOptionId: $attireOptionId
|
||||
verificationPhotoUrl: $verificationPhotoUrl
|
||||
verificationId: $verificationId
|
||||
verificationStatus: PENDING
|
||||
}
|
||||
)
|
||||
}
|
||||
8
backend/dataconnect/connector/staffAttire/queries.gql
Normal file
8
backend/dataconnect/connector/staffAttire/queries.gql
Normal file
@@ -0,0 +1,8 @@
|
||||
query getStaffAttire($staffId: UUID!) @auth(level: USER) {
|
||||
staffAttires(where: { staffId: { eq: $staffId } }) {
|
||||
attireOptionId
|
||||
verificationStatus
|
||||
verificationPhotoUrl
|
||||
verificationId
|
||||
}
|
||||
}
|
||||
3
backend/dataconnect/functions/cleanAttire.gql
Normal file
3
backend/dataconnect/functions/cleanAttire.gql
Normal file
@@ -0,0 +1,3 @@
|
||||
mutation cleanAttireOptions @transaction {
|
||||
attireOption_deleteMany(all: true)
|
||||
}
|
||||
@@ -1770,5 +1770,163 @@ mutation seedAll @transaction {
|
||||
invoiceId: "ba0529be-7906-417f-8ec7-c866d0633fee"
|
||||
}
|
||||
)
|
||||
|
||||
# Attire Options (Required)
|
||||
attire_1: attireOption_insert(
|
||||
data: {
|
||||
id: "4bce6592-e38e-4d90-a478-d1ce0f286146"
|
||||
itemId: "shoes_non_slip"
|
||||
label: "Non Slip Shoes"
|
||||
description: "Black, closed-toe, non-slip work shoes."
|
||||
imageUrl: "https://images.unsplash.com/photo-1549298916-b41d501d3772?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_2: attireOption_insert(
|
||||
data: {
|
||||
id: "786e9761-b398-42bd-b363-91a40938864e"
|
||||
itemId: "pants_black"
|
||||
label: "Black Pants"
|
||||
description: "Professional black slacks or trousers. No jeans."
|
||||
imageUrl: "https://images.unsplash.com/photo-1594633312681-425c7b97ccd1?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_3: attireOption_insert(
|
||||
data: {
|
||||
id: "17b135e6-b8f0-4541-b12b-505e95de31ef"
|
||||
itemId: "socks_black"
|
||||
label: "Black Socks"
|
||||
description: "Solid black dress or crew socks."
|
||||
imageUrl: "https://images.unsplash.com/photo-1582966298431-99c6a1e8d44e?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_4: attireOption_insert(
|
||||
data: {
|
||||
id: "bbff61b3-3f99-4637-9a2f-1d4c6fa61517"
|
||||
itemId: "shirt_white_button_up"
|
||||
label: "White Button Up"
|
||||
description: "Clean, pressed, long-sleeve white button-up shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1521572163474-6864f9cf17ab?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
|
||||
# Attire Options (Non-Essential)
|
||||
attire_5: attireOption_insert(
|
||||
data: {
|
||||
id: "32e77813-24f5-495b-98de-872e33073820"
|
||||
itemId: "pants_blue_jeans"
|
||||
label: "Blue Jeans"
|
||||
description: "Standard blue denim jeans, no rips or tears."
|
||||
imageUrl: "https://images.unsplash.com/photo-1542272604-787c3835535d?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_6: attireOption_insert(
|
||||
data: {
|
||||
id: "de3c5a90-2c88-4c87-bb00-b62c6460d506"
|
||||
itemId: "shirt_white_polo"
|
||||
label: "White Polo"
|
||||
description: "White polo shirt with collar."
|
||||
imageUrl: "https://images.unsplash.com/photo-1581655353564-df123a1eb820?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_7: attireOption_insert(
|
||||
data: {
|
||||
id: "64149864-b886-4a00-9aa2-09903a401b5b"
|
||||
itemId: "shirt_catering"
|
||||
label: "Catering Shirt"
|
||||
description: "Company approved catering staff shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1559339352-11d035aa65de?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_8: attireOption_insert(
|
||||
data: {
|
||||
id: "9b2e493e-e95c-4dcd-9073-e42dbcf77076"
|
||||
itemId: "banquette"
|
||||
label: "Banquette"
|
||||
description: "Standard banquette or event setup uniform."
|
||||
imageUrl: "https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_9: attireOption_insert(
|
||||
data: {
|
||||
id: "2e30cde5-5acd-4dd0-b8e9-af6d6b59b248"
|
||||
itemId: "hat_black_cap"
|
||||
label: "Black Cap"
|
||||
description: "Plain black baseball cap, no logos."
|
||||
imageUrl: "https://images.unsplash.com/photo-1588850561407-ed78c282e89b?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_10: attireOption_insert(
|
||||
data: {
|
||||
id: "90d912ed-1227-44ef-ae75-bc7ca2c491c6"
|
||||
itemId: "chef_coat"
|
||||
label: "Chef Coat"
|
||||
description: "Standard white double-breasted chef coat."
|
||||
imageUrl: "https://images.unsplash.com/photo-1583394293214-28ded15ee548?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_11: attireOption_insert(
|
||||
data: {
|
||||
id: "d857d96b-5bf4-4648-bb9c-f909436729fd"
|
||||
itemId: "shirt_black_button_up"
|
||||
label: "Black Button Up"
|
||||
description: "Clean, pressed, long-sleeve black button-up shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1598033129183-c4f50c7176c8?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_12: attireOption_insert(
|
||||
data: {
|
||||
id: "1f61267b-1f7a-43f1-bfd7-2a018347285b"
|
||||
itemId: "shirt_black_polo"
|
||||
label: "Black Polo"
|
||||
description: "Black polo shirt with collar."
|
||||
imageUrl: "https://images.unsplash.com/photo-1583743814966-8936f5b7be1a?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_13: attireOption_insert(
|
||||
data: {
|
||||
id: "16192098-e5ec-4bf2-86d3-c693663BA687"
|
||||
itemId: "all_black_bistro"
|
||||
label: "All Black Bistro"
|
||||
description: "Full black bistro uniform including apron."
|
||||
imageUrl: "https://images.unsplash.com/photo-1551632432-c735e8399527?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_14: attireOption_insert(
|
||||
data: {
|
||||
id: "6be15ab9-6c73-453b-950b-d4ba35d875de"
|
||||
itemId: "white_black_bistro"
|
||||
label: "White and Black Bistro"
|
||||
description: "White shirt with black pants and bistro apron."
|
||||
imageUrl: "https://images.unsplash.com/photo-1600565193348-f74bd3c7ccdf?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
}
|
||||
#v.3
|
||||
159
backend/dataconnect/functions/seedAttire.gql
Normal file
159
backend/dataconnect/functions/seedAttire.gql
Normal file
@@ -0,0 +1,159 @@
|
||||
mutation seedAttireOptions @transaction {
|
||||
# Attire Options (Required)
|
||||
attire_1: attireOption_upsert(
|
||||
data: {
|
||||
id: "4bce6592-e38e-4d90-a478-d1ce0f286146"
|
||||
itemId: "shoes_non_slip"
|
||||
label: "Non Slip Shoes"
|
||||
description: "Black, closed-toe, non-slip work shoes."
|
||||
imageUrl: "https://images.unsplash.com/photo-1549298916-b41d501d3772?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_2: attireOption_upsert(
|
||||
data: {
|
||||
id: "786e9761-b398-42bd-b363-91a40938864e"
|
||||
itemId: "pants_black"
|
||||
label: "Black Pants"
|
||||
description: "Professional black slacks or trousers. No jeans."
|
||||
imageUrl: "https://images.unsplash.com/photo-1594633312681-425c7b97ccd1?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_3: attireOption_upsert(
|
||||
data: {
|
||||
id: "17b135e6-b8f0-4541-b12b-505e95de31ef"
|
||||
itemId: "socks_black"
|
||||
label: "Black Socks"
|
||||
description: "Solid black dress or crew socks."
|
||||
imageUrl: "https://images.unsplash.com/photo-1582966298431-99c6a1e8d44e?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_4: attireOption_upsert(
|
||||
data: {
|
||||
id: "bbff61b3-3f99-4637-9a2f-1d4c6fa61517"
|
||||
itemId: "shirt_white_button_up"
|
||||
label: "White Button Up"
|
||||
description: "Clean, pressed, long-sleeve white button-up shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1521572163474-6864f9cf17ab?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: true
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
|
||||
# Attire Options (Non-Essential)
|
||||
attire_5: attireOption_upsert(
|
||||
data: {
|
||||
id: "32e77813-24f5-495b-98de-872e33073820"
|
||||
itemId: "pants_blue_jeans"
|
||||
label: "Blue Jeans"
|
||||
description: "Standard blue denim jeans, no rips or tears."
|
||||
imageUrl: "https://images.unsplash.com/photo-1542272604-787c3835535d?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_6: attireOption_upsert(
|
||||
data: {
|
||||
id: "de3c5a90-2c88-4c87-bb00-b62c6460d506"
|
||||
itemId: "shirt_white_polo"
|
||||
label: "White Polo"
|
||||
description: "White polo shirt with collar."
|
||||
imageUrl: "https://images.unsplash.com/photo-1581655353564-df123a1eb820?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_7: attireOption_upsert(
|
||||
data: {
|
||||
id: "64149864-b886-4a00-9aa2-09903a401b5b"
|
||||
itemId: "shirt_catering"
|
||||
label: "Catering Shirt"
|
||||
description: "Company approved catering staff shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1559339352-11d035aa65de?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_8: attireOption_upsert(
|
||||
data: {
|
||||
id: "9b2e493e-e95c-4dcd-9073-e42dbcf77076"
|
||||
itemId: "banquette"
|
||||
label: "Banquette"
|
||||
description: "Standard banquette or event setup uniform."
|
||||
imageUrl: "https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_9: attireOption_upsert(
|
||||
data: {
|
||||
id: "2e30cde5-5acd-4dd0-b8e9-af6d6b59b248"
|
||||
itemId: "hat_black_cap"
|
||||
label: "Black Cap"
|
||||
description: "Plain black baseball cap, no logos."
|
||||
imageUrl: "https://images.unsplash.com/photo-1588850561407-ed78c282e89b?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_10: attireOption_upsert(
|
||||
data: {
|
||||
id: "90d912ed-1227-44ef-ae75-bc7ca2c491c6"
|
||||
itemId: "chef_coat"
|
||||
label: "Chef Coat"
|
||||
description: "Standard white double-breasted chef coat."
|
||||
imageUrl: "https://images.unsplash.com/photo-1583394293214-28ded15ee548?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_11: attireOption_upsert(
|
||||
data: {
|
||||
id: "d857d96b-5bf4-4648-bb9c-f909436729fd"
|
||||
itemId: "shirt_black_button_up"
|
||||
label: "Black Button Up"
|
||||
description: "Clean, pressed, long-sleeve black button-up shirt."
|
||||
imageUrl: "https://images.unsplash.com/photo-1598033129183-c4f50c7176c8?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_12: attireOption_upsert(
|
||||
data: {
|
||||
id: "1f61267b-1f7a-43f1-bfd7-2a018347285b"
|
||||
itemId: "shirt_black_polo"
|
||||
label: "Black Polo"
|
||||
description: "Black polo shirt with collar."
|
||||
imageUrl: "https://images.unsplash.com/photo-1583743814966-8936f5b7be1a?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_13: attireOption_upsert(
|
||||
data: {
|
||||
id: "16192098-e5ec-4bf2-86d3-c693663BA687"
|
||||
itemId: "all_black_bistro"
|
||||
label: "All Black Bistro"
|
||||
description: "Full black bistro uniform including apron."
|
||||
imageUrl: "https://images.unsplash.com/photo-1551632432-c735e8399527?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
attire_14: attireOption_upsert(
|
||||
data: {
|
||||
id: "6be15ab9-6c73-453b-950b-d4ba35d875de"
|
||||
itemId: "white_black_bistro"
|
||||
label: "White and Black Bistro"
|
||||
description: "White shirt with black pants and bistro apron."
|
||||
imageUrl: "https://images.unsplash.com/photo-1600565193348-f74bd3c7ccdf?auto=format&fit=crop&q=80&w=400&h=400"
|
||||
isMandatory: false
|
||||
vendorId: "c3b25c47-0ebd-4402-a9b1-b8a875a7f71a"
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -2,7 +2,7 @@ type AttireOption @table(name: "attire_options") {
|
||||
id: UUID! @default(expr: "uuidV4()")
|
||||
itemId: String!
|
||||
label: String!
|
||||
icon: String
|
||||
description: String
|
||||
imageUrl: String
|
||||
isMandatory: Boolean
|
||||
|
||||
|
||||
22
backend/dataconnect/schema/staffAttire.gql
Normal file
22
backend/dataconnect/schema/staffAttire.gql
Normal file
@@ -0,0 +1,22 @@
|
||||
enum AttireVerificationStatus {
|
||||
PENDING
|
||||
FAILED
|
||||
SUCCESS
|
||||
}
|
||||
|
||||
type StaffAttire @table(name: "staff_attires", key: ["staffId", "attireOptionId"]) {
|
||||
staffId: UUID!
|
||||
staff: Staff! @ref(fields: "staffId", references: "id")
|
||||
|
||||
attireOptionId: UUID!
|
||||
attireOption: AttireOption! @ref(fields: "attireOptionId", references: "id")
|
||||
|
||||
# Verification Metadata
|
||||
verificationStatus: AttireVerificationStatus @default(expr: "'PENDING'")
|
||||
verifiedAt: Timestamp
|
||||
verificationPhotoUrl: String # Proof of ownership
|
||||
verificationId: String
|
||||
|
||||
createdAt: Timestamp @default(expr: "request.time")
|
||||
updatedAt: Timestamp @default(expr: "request.time")
|
||||
}
|
||||
Reference in New Issue
Block a user