@bizmap/sdk 0.0.73 → 0.0.74
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/dist/main.js +1 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -778,7 +778,6 @@ function findNextAvailableStaff(userUids, algorithm, staff) {
|
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
// src/functions/scheduleAppointment.ts
|
|
781
|
-
import { adminRoles as adminRoles2 } from "src/main";
|
|
782
781
|
async function scheduleAppointment(request) {
|
|
783
782
|
request.form = ScheduleAppointmentForm.parse(request.form);
|
|
784
783
|
request.sender = UserDetails.parse(request.sender);
|
|
@@ -854,7 +853,7 @@ async function scheduleAppointment(request) {
|
|
|
854
853
|
if (totalPaid < totalOwed) throw new Error("Insufficient payments made.");
|
|
855
854
|
}
|
|
856
855
|
if (stateCopy.credits.current < request.cost) {
|
|
857
|
-
if (companyUser.roles.some((role) =>
|
|
856
|
+
if (companyUser.roles.some((role) => adminRoles.safeParse(role).success)) {
|
|
858
857
|
throw new Error("Account balance has insufficient funds.");
|
|
859
858
|
} else {
|
|
860
859
|
throw new Error(
|