diff --git a/_reference/New Hasura Deployment.md b/_reference/New Hasura Deployment.md index 0594f3d6a..1f9856eeb 100644 --- a/_reference/New Hasura Deployment.md +++ b/_reference/New Hasura Deployment.md @@ -1,7 +1,8 @@ Postman Method: -POST https://db.imex.online/v1alpha1/pg_dump -Set x-hasura-admin-secret header. -Body is RAW JSON: +POST https://db.imex.online/v1alpha1/pg_dump +Set x-hasura-admin-secret header. +Body is RAW JSON: + ``` { "opts": ["-O", "-x", "--schema-only", "--schema", "public"], @@ -9,14 +10,15 @@ Body is RAW JSON: } ``` -Save output. -Manually export hasura metadata on production. +Save output. +Manually export hasura metadata on production. -Go to new instance. +Go to new instance. Run SQL ``` CREATE EXTENSION pg_trgm ``` + Run SQL from PG Dump -Import hasura metadata. \ No newline at end of file +Import hasura metadata. diff --git a/_reference/dropletSetup.md b/_reference/dropletSetup.md index 94c842363..34118319f 100644 --- a/_reference/dropletSetup.md +++ b/_reference/dropletSetup.md @@ -47,7 +47,7 @@ Add the SSH key to the drop creation screen. 7. Alter Nginx config 1. sudo nano /etc/nginx/sites-available/default 2. //Add Appropriate server names to the file. www. and non-www. - 3. Add the following inside the location of the server block: + 3. Add the following inside the location of the server block: (Remove the 404 bit.) proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/client/package.json b/client/package.json index 822a69621..4872a1d60 100644 --- a/client/package.json +++ b/client/package.json @@ -19,6 +19,7 @@ "craco-less": "^1.17.1", "dinero.js": "^1.8.1", "dotenv": "^8.2.0", + "env-cmd": "^10.1.0", "firebase": "^8.4.1", "graphql": "^15.5.0", "i18next": "^20.2.1", @@ -73,6 +74,7 @@ "analyze": "source-map-explorer 'build/static/js/*.js'", "start": "craco start", "build": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build", + "build:test": "env-cmd -f .env.test npm run build", "buildcra": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` react-scripts build", "build-deploy": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build && s3cmd sync build/* s3://imex-online-production && echo '🚀 Deployed!'", "test": "craco test", diff --git a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js index 02aed08fb..c8c9bf7a8 100644 --- a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js +++ b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js @@ -44,8 +44,12 @@ export function ScheduleCalendarHeaderComponent({ }, [events, date]); const isDayBlocked = useMemo(() => { - return events.filter( - (e) => moment(date).isSame(moment(e.start), "day") && e.block + if (!events) return []; + return ( + events && + events.filter( + (e) => moment(date).isSame(moment(e.start), "day") && e.block + ) ); }, [events, date]); diff --git a/client/src/graphql/appointments.queries.js b/client/src/graphql/appointments.queries.js index 18b707979..2e727fde7 100644 --- a/client/src/graphql/appointments.queries.js +++ b/client/src/graphql/appointments.queries.js @@ -109,6 +109,7 @@ export const QUERY_APPOINTMENT_BY_DATE = gql` end title isintake + block job { alt_transport ro_number @@ -186,6 +187,7 @@ export const QUERY_APPOINTMENTS_BY_JOBID = gql` arrived canceled created_at + block } } `; diff --git a/client/yarn.lock b/client/yarn.lock index 0b64a54b0..0cb1d8853 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -4181,7 +4181,7 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.1.1: +commander@^4.0.0, commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -5299,6 +5299,14 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== +env-cmd@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/env-cmd/-/env-cmd-10.1.0.tgz#c7f5d3b550c9519f137fdac4dd8fb6866a8c8c4b" + integrity sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA== + dependencies: + commander "^4.0.0" + cross-spawn "^7.0.0" + errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"