From 06b18c14cdd4c1c0831fc7241a62ead316c27720 Mon Sep 17 00:00:00 2001 From: Ayushya Amitabh Date: Thu, 22 Apr 2021 12:11:23 -0400 Subject: [PATCH] v1.1.0/release -fix dose logic -fix popup icon style --- functions/src/index.ts | 8 ++++++++ website/public/styles/extrasmall.css | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index ea51574..911130e 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -234,6 +234,14 @@ export const saveResultV1 = functions.https.onCall( // Update user result const cleanData: SaveResultRequestData = Object.assign({}, data); delete cleanData.gid; + if (cleanData.dose && cleanData.dose === VAX_DOSES.ONE) { + Object.keys(cleanData[VAX_DOSES.TWO]).forEach((symptom) => { + if (cleanData[VAX_DOSES.TWO][symptom] === true) { + cleanData.dose = VAX_DOSES.TWO; + data.dose = VAX_DOSES.TWO; + } + }); + } await admin .firestore() .collection("results") diff --git a/website/public/styles/extrasmall.css b/website/public/styles/extrasmall.css index df7d9d7..6c71a79 100644 --- a/website/public/styles/extrasmall.css +++ b/website/public/styles/extrasmall.css @@ -295,9 +295,9 @@ footer .by { } .input-popup-header-icon { cursor: pointer; - background-color: var(--color-secondary); + background-color: var(--color-primary); outline: none; - color: var(--color-primary); + color: var(--color-secondary); border: 1px solid transparent; border-radius: 10rem; height: 5rem;