@bash-app/bash-common 29.31.0 → 29.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -934,6 +934,7 @@ model AssociatedService {
|
|
|
934
934
|
}
|
|
935
935
|
|
|
936
936
|
enum ServiceCancelationPolicy {
|
|
937
|
+
None
|
|
937
938
|
VeryFlexible
|
|
938
939
|
Flexible
|
|
939
940
|
Standard90Day
|
|
@@ -989,7 +990,7 @@ model Service {
|
|
|
989
990
|
emergencyContact String?
|
|
990
991
|
contactDetails String?
|
|
991
992
|
// rates Rate[] @relation("MultipleRates")
|
|
992
|
-
cancellationPolicy ServiceCancelationPolicy?
|
|
993
|
+
cancellationPolicy ServiceCancelationPolicy? @default(None)
|
|
993
994
|
// refundPolicy String?
|
|
994
995
|
// insurancePolicy String?
|
|
995
996
|
// hoursOfOperation Json? @default("{}")
|
|
@@ -1146,25 +1147,26 @@ model Sponsor {
|
|
|
1146
1147
|
}
|
|
1147
1148
|
|
|
1148
1149
|
model Venue {
|
|
1149
|
-
id
|
|
1150
|
-
serviceId
|
|
1151
|
-
service
|
|
1150
|
+
id String @id @default(cuid())
|
|
1151
|
+
serviceId String @unique
|
|
1152
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1152
1153
|
// serviceConnectionId String? //Check: ?
|
|
1153
1154
|
// serviceConnection String?
|
|
1154
|
-
yearsInBusiness
|
|
1155
|
-
amenities
|
|
1156
|
-
menuItems
|
|
1157
|
-
features
|
|
1158
|
-
venueTypes
|
|
1159
|
-
secondaryVenueTypes
|
|
1160
|
-
pitch
|
|
1161
|
-
capacity
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1155
|
+
yearsInBusiness YearsOfExperience @default(LessThanOneYear)
|
|
1156
|
+
amenities String[]
|
|
1157
|
+
menuItems String?
|
|
1158
|
+
features String[]
|
|
1159
|
+
venueTypes String[]
|
|
1160
|
+
secondaryVenueTypes String[] @default([])
|
|
1161
|
+
pitch String?
|
|
1162
|
+
capacity Int?
|
|
1163
|
+
anticipatedAttendees Int?
|
|
1164
|
+
trademark Boolean?
|
|
1165
|
+
manager Boolean?
|
|
1166
|
+
allowed String?
|
|
1167
|
+
notAllowed String?
|
|
1168
|
+
vibe String?
|
|
1169
|
+
dress String?
|
|
1168
1170
|
|
|
1169
1171
|
pricingPlan VenuePricingPlan? @default(Percentage)
|
|
1170
1172
|
subscriptionStatus SubscriptionStatus?
|
|
@@ -1372,6 +1374,7 @@ model ServiceRate {
|
|
|
1372
1374
|
rateType ServiceRateType
|
|
1373
1375
|
hourlyRate Int?
|
|
1374
1376
|
dailyRate Int?
|
|
1377
|
+
cleaningFeePerBooking Int?
|
|
1375
1378
|
minimumTimeBlockHours Int?
|
|
1376
1379
|
serviceSpecialRates ServiceSpecialRates?
|
|
1377
1380
|
serviceDailyRates ServiceDailyRates?
|
|
@@ -17,6 +17,11 @@ export type ServiceCancelationPolicyMap = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const ServiceCancelationPolicyData: ServiceCancelationPolicyMap = {
|
|
20
|
+
[ServiceCancelationPolicyOption.None]: {
|
|
21
|
+
name: "None",
|
|
22
|
+
refundPolicy: [],
|
|
23
|
+
description: "No cancelation policy."
|
|
24
|
+
},
|
|
20
25
|
[ServiceCancelationPolicyOption.VeryFlexible]: {
|
|
21
26
|
name: "Very Flexible",
|
|
22
27
|
refundPolicy: [
|
|
@@ -90,7 +95,7 @@ function generateDescription(refundPolicy: ServiceCancelationRefundPolicy[]): st
|
|
|
90
95
|
return descriptions.join(" ");
|
|
91
96
|
}
|
|
92
97
|
|
|
93
|
-
Object.keys(ServiceCancelationPolicyData).forEach((policyKey) => {
|
|
98
|
+
Object.keys(ServiceCancelationPolicyData).filter((policyKey) => policyKey as ServiceCancelationPolicyOption != ServiceCancelationPolicyOption.None).forEach((policyKey) => {
|
|
94
99
|
const policy = ServiceCancelationPolicyData[policyKey as ServiceCancelationPolicyOption];
|
|
95
100
|
policy.description = generateDescription(policy.refundPolicy);
|
|
96
101
|
});
|