Skip to content

Commit

Permalink
Merge pull request #437 from CirclesUBI/dev-app491-inactive-shop-disc…
Browse files Browse the repository at this point in the history
…laimer-update

Update disclaimer checklist content
  • Loading branch information
dacianavram authored Oct 25, 2023
2 parents 26043fe + fe682d6 commit e6e20e8
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 24 deletions.
10 changes: 6 additions & 4 deletions shell/public/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,15 @@
"dapps.o-homepage.components.survey.button.signUpNow": "Sign up Now",
"dapps.o-homepage.components.survey.circleIs": "Circles is a free mobile application",
"dapps.o-homepage.components.survey.eachCircle": "Each Circles user receives 24 Circles points per day. These points can be transferred to other Circles users in exchange for products and services.",
"dapps.o-homepage.components.survey.informedConsent.fifthCheckbox": "I understand that Circles project will be collecting information I provide in this app as a means of better understanding how Circles can work in my area.",
"dapps.o-homepage.components.survey.informedConsent.firstCheckbox": "I understand that Circles is conduction a research project.",
"dapps.o-homepage.components.survey.informedConsent.secondCheckbox": "I understand that Circles project will be collecting information I provide in this app as a means of better understanding how Circles can work in my area.",
"dapps.o-homepage.components.survey.informedConsent.thirdCheckbox": "I understand that when the Circles research project end I may not be able to use Circles points that remain in my Circles wallet.",
"dapps.o-homepage.components.survey.informedConsent.fourthCheckbox": "I understand that Circles points cannot be exchanged for Rupiah or any other currency.",
"dapps.o-homepage.components.survey.informedConsent.fifthCheckbox": "I understand that I can only receive circles points from someone that is trusted by me or my circles friends",
"dapps.o-homepage.components.survey.informedConsent.sixthCheckbox": "If your shop has no exchanges for 30 days, it may be disabled.",
"dapps.o-homepage.components.survey.informedConsent.seventhCheckbox": "If your shop lists Illegal/unethical items, it may be disabled.",
"dapps.o-homepage.components.survey.informedConsent.eighthCheckbox": "If your account is inactive for 3 months or more, it may be deleted.",
"dapps.o-homepage.components.survey.informedConsent.info": "You haven't ticked all the boxes so you cannot use the Circles app.",
"dapps.o-homepage.components.survey.informedConsent.secondCheckbox": "I agree to participate in this Circles research project.",
"dapps.o-homepage.components.survey.informedConsent.sixthCheckbox": "I understand that I can only receive circles points from someone that is trusted by me or my circles friends",
"dapps.o-homepage.components.survey.informedConsent.thirdCheckbox": "I understand that when the Circles research project end I may not be able to use Circles points that remain in my Circles wallet.",
"dapps.o-homepage.components.survey.informedConsent.title.bottom": "If you have any questions, please reach out to a local circles representative.",
"dapps.o-homepage.components.survey.informedConsent.title.middle": "If you agree, press the boxes to tick.",
"dapps.o-homepage.components.survey.informedConsent.title.top": "Before you can use this app you need to agree to the following points.",
Expand Down
10 changes: 6 additions & 4 deletions shell/public/dictionaries/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,15 @@
"dapps.o-homepage.components.survey.button.signUpNow": "Sign up Now",
"dapps.o-homepage.components.survey.circleIs": "Circles is a free mobile application",
"dapps.o-homepage.components.survey.eachCircle": "Each Circles user receives 24 Circles points per day. These points can be transferred to other Circles users in exchange for products and services.",
"dapps.o-homepage.components.survey.informedConsent.fifthCheckbox": "I understand that Circles project will be collecting information I provide in this app as a means of better understanding how Circles can work in my area.",
"dapps.o-homepage.components.survey.informedConsent.firstCheckbox": "I understand that Circles is conduction a research project.",
"dapps.o-homepage.components.survey.informedConsent.secondCheckbox": "I understand that Circles project will be collecting information I provide in this app as a means of better understanding how Circles can work in my area.",
"dapps.o-homepage.components.survey.informedConsent.thirdCheckbox": "I understand that when the Circles research project end I may not be able to use Circles points that remain in my Circles wallet.",
"dapps.o-homepage.components.survey.informedConsent.fourthCheckbox": "I understand that Circles points cannot be exchanged for Rupiah or any other currency.",
"dapps.o-homepage.components.survey.informedConsent.fifthCheckbox": "I understand that I can only receive circles points from someone that is trusted by me or my circles friends",
"dapps.o-homepage.components.survey.informedConsent.sixthCheckbox": "If your shop has no exchanges for 30 days, it may be disabled.",
"dapps.o-homepage.components.survey.informedConsent.seventhCheckbox": "If your shop lists Illegal/unethical items, it may be disabled.",
"dapps.o-homepage.components.survey.informedConsent.eighthCheckbox": "If your account is inactive for 3 months or more, it may be deleted.",
"dapps.o-homepage.components.survey.informedConsent.info": "You haven't ticked all the boxes so you cannot use the Circles app.",
"dapps.o-homepage.components.survey.informedConsent.secondCheckbox": "I agree to participate in this Circles research project.",
"dapps.o-homepage.components.survey.informedConsent.sixthCheckbox": "I understand that I can only receive circles points from someone that is trusted by me or my circles friends",
"dapps.o-homepage.components.survey.informedConsent.thirdCheckbox": "I understand that when the Circles research project end I may not be able to use Circles points that remain in my Circles wallet.",
"dapps.o-homepage.components.survey.informedConsent.title.bottom": "If you have any questions, please reach out to a local circles representative.",
"dapps.o-homepage.components.survey.informedConsent.title.middle": "If you agree, press the boxes to tick.",
"dapps.o-homepage.components.survey.informedConsent.title.top": "Before you can use this app you need to agree to the following points.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function validateCheckBox() {
return (value: boolean) => ({ valid: value === true, name: "not_set" });
}
const research = field("research", false, [required(), validateCheckBox()]);
const participate = field("participate", false, [required(), validateCheckBox()]);
const collect = field("collect", false, [required(), validateCheckBox()]);
const ending = field("ending", false, [required(), validateCheckBox()]);
const myForm = form(research, participate, ending);
const myForm = form(research, collect, ending);
myForm.validate();
onMount(() => {
$research.value = $surveyConsents.researchConsent;
$participate.value = $surveyConsents.participateConsent;
$collect.value = $surveyConsents.dataCollectConsent;
$ending.value = $surveyConsents.endingConsent;
});
Expand All @@ -29,7 +29,7 @@ function handleClick(button) {
} else {
if ($myForm.valid) {
$surveyConsents.researchConsent = $research.value;
$surveyConsents.participateConsent = $participate.value;
$surveyConsents.dataCollectConsent = $collect.value;
$surveyConsents.endingConsent = $ending.value;
sessionStorage.setItem("surveyConsentPage1", "true");
push("#/survey/page/2");
Expand Down Expand Up @@ -60,7 +60,7 @@ function handleClick(button) {
</label>
</div>
<div class="mx-10 my-5 uppercase">
<input id="check-2" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$participate.value}" />
<input id="check-2" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$collect.value}" />
<label for="check-2" class="cursor-pointer">
<Label key="dapps.o-homepage.components.survey.informedConsent.secondCheckbox" />
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ function validateCheckBox() {
}
const exchange = field("exchange", false, [required(), validateCheckBox()]);
const dataCollect = field("dataCollect", false, [required(), validateCheckBox()]);
const onlyFromFriends = field("onlyFromFriends", false, [required(), validateCheckBox()]);
const myForm = form(exchange, dataCollect, onlyFromFriends);
const noExchanges = field("noExchanges", false, [required(), validateCheckBox()]);
const unethicalItems = field("unethicalItems", false, [required(), validateCheckBox()]);
const inactiveAccount = field("inactiveAccount", false, [required(), validateCheckBox()]);
const myForm = form(exchange, onlyFromFriends, noExchanges, unethicalItems, inactiveAccount);
myForm.validate();
onMount(() => {
if (sessionStorage.getItem("surveyConsentPage1") === "true") {
$exchange.value = $surveyConsents.exchangeConsent;
$dataCollect.value = $surveyConsents.dataCollectConsent;
$onlyFromFriends.value = $surveyConsents.onlyFromFriends;
$onlyFromFriends.value = $surveyConsents.onlyFromFriendsConsent;
$noExchanges.value = $surveyConsents.noExchangesConsent;
$unethicalItems.value = $surveyConsents.unethicalItemsConsent;
$inactiveAccount.value = $surveyConsents.inactiveAccountConsent;
} else {
push("#/survey/page/1");
}
Expand All @@ -34,8 +38,10 @@ function handleClick(button) {
} else {
if ($myForm.valid) {
$surveyConsents.exchangeConsent = $exchange.value;
$surveyConsents.dataCollectConsent = $dataCollect.value;
$surveyConsents.onlyFromFriends = $onlyFromFriends.value;
$surveyConsents.onlyFromFriendsConsent = $onlyFromFriends.value;
$surveyConsents.noExchangesConsent = $noExchanges.value;
$surveyConsents.unethicalItemsConsent = $unethicalItems.value;
$surveyConsents.inactiveAccountConsent = $inactiveAccount.value;
$surveyConsents.allConsentsGiven = true;
sessionStorage.setItem("surveyConsentPage2", "true");
push("#/survey/page/3");
Expand Down Expand Up @@ -66,17 +72,29 @@ function handleClick(button) {
</label>
</div>
<div class="mx-10 my-5 uppercase">
<input id="check-2" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$dataCollect.value}" />
<input id="check-2" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$onlyFromFriends.value}" />
<label for="check-2" class="cursor-pointer">
<Label key="dapps.o-homepage.components.survey.informedConsent.fifthCheckbox" />
</label>
</div>
<div class="mx-10 my-5 uppercase">
<input id="check-3" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$onlyFromFriends.value}" />
<input id="check-3" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$noExchanges.value}" />
<label for="check-3" class="cursor-pointer">
<Label key="dapps.o-homepage.components.survey.informedConsent.sixthCheckbox" />
</label>
</div>
<div class="mx-10 my-5 uppercase">
<input id="check-4" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$unethicalItems.value}" />
<label for="check-4" class="cursor-pointer">
<Label key="dapps.o-homepage.components.survey.informedConsent.seventhCheckbox" />
</label>
</div>
<div class="mx-10 my-5 uppercase">
<input id="check-5" type="checkbox" class="mr-2 checkbox checkbox-warning" bind:checked="{$inactiveAccount.value}" />
<label for="check-5" class="cursor-pointer">
<Label key="dapps.o-homepage.components.survey.informedConsent.eighthCheckbox" />
</label>
</div>
{#if !$myForm.valid}
<div class="mx-10 my-5 text-sm text-center text-info">
<Label key="dapps.o-homepage.components.survey.informedConsent.info" />
Expand Down
8 changes: 5 additions & 3 deletions shell/src/dapps/o-survey/stores/surveyStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { writable } from "svelte/store";
import { SurveyDataInput } from "../../../shared/api/data/types";
export const surveyConsents = writable({
researchConsent: false,
participateConsent: false,
dataCollectConsent: false,
endingConsent: false,
exchangeConsent: false,
dataCollectConsent: false,
onlyFromFriends: false,
onlyFromFriendsConsent: false,
noExchangesConsent: false,
unethicalItemsConsent: false,
inactiveAccountConsent: false,
allConsentsGiven: false,
});

Expand Down

0 comments on commit e6e20e8

Please sign in to comment.