Skip to content

Commit

Permalink
Merge pull request #121 from socialappslab/fix/659/visit-permission
Browse files Browse the repository at this point in the history
fix: add visit permission based on early exit
  • Loading branch information
zant authored Jan 16, 2025
2 parents 0064b37 + 56d6515 commit f9ec9c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/(auth)/(visit)/summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function Summary() {
const completeVisitData = {
...visitData,
house: visitData.houseId ? undefined : visitData.house,
visitPermission: true,
visitPermission: notAllowed__EarlyExit ? false : true,
host: user.firstName,
visitedAt: new Date(),
inspections,
Expand All @@ -93,10 +93,10 @@ export default function Summary() {

try {
// We only make the request if it's connected
if (isConnected) {
rollbar.log(JSON.stringify(sanitizedVisitData));
if (isConnected)
await createVisit({ json_params: JSON.stringify(sanitizedVisitData) });
}
if (isConnected && rollbar)
rollbar.log(JSON.stringify(sanitizedVisitData));

Toast.show({
type: "success",
Expand Down

0 comments on commit f9ec9c9

Please sign in to comment.