From fb125ea0ccf6a0260742f168856aba8258692c6e Mon Sep 17 00:00:00 2001 From: Max Morgan Date: Mon, 7 Oct 2024 11:03:57 -0400 Subject: [PATCH] Remove load & continue feature --- src/components/App/App.js | 4 +- src/components/Form/Form.js | 32 ---- src/data/property.app.json | 293 ------------------------------------ 3 files changed, 2 insertions(+), 327 deletions(-) diff --git a/src/components/App/App.js b/src/components/App/App.js index 0a421d5..69e44f4 100644 --- a/src/components/App/App.js +++ b/src/components/App/App.js @@ -31,7 +31,7 @@ function App() { const restartApp = (e) => { e.preventDefault(); - if(btnState == 'Save & Exit') { + if(btnState == 'Restart') { setAppID(undefined); setStepHistory([]); setFormData(undefined); @@ -55,7 +55,7 @@ function App() {

{header.logoAlt} {header.text}

{(step > 0) ? : ""} - +
); diff --git a/src/components/Form/Form.js b/src/components/Form/Form.js index bf98f3f..2092ff3 100644 --- a/src/components/Form/Form.js +++ b/src/components/Form/Form.js @@ -557,24 +557,6 @@ function Form(props) { }); break; - case 'loadApplication': - e.json().then(data => { - if(data.status == 'incomplete'){ - setAppID(data.id); - setFormData(data.answers); - tempHistory = stepHistory; - tempHistory.push(currentStep); - setStepHistory(tempHistory); - setStep(1); - }else{ - tempHistory = stepHistory; - tempHistory.push(currentStep); - setStepHistory(tempHistory); - setStep(2); - } - }); - break; - default: tempHistory = stepHistory; tempHistory.push(currentStep); @@ -590,9 +572,6 @@ function Form(props) { case 'saveForm': break; - case 'loadApplication': - break; - default:; break; } @@ -604,9 +583,6 @@ function Form(props) { case 'saveForm': break; - case 'loadApplication': - break; - default: break; } @@ -854,14 +830,6 @@ function Form(props) { Connector.start('get',`https://apis.detroitmi.gov/property_applications/${inputData['app-id']}/status/`,null,false,null,'application/json',(e)=>{handleAPICalls(e, 'getStatus', step)},(e)=>{handleAPICalls(e, 'getStatus', step)}); break; - case 'answers': - if(requirements.service == 'surveys'){ - Connector.start('get',`https://apis.detroitmi.gov/${requirements.service}${requirements.surveyID}/`,null,false,null,'application/json',(e)=>{handleAPICalls(e, 'loadApplication', step)},(e)=>{handleAPICalls(e, 'loadApplication', step)}); - }else{ - Connector.start('get',`https://apis.detroitmi.gov/property_applications/${inputData['app-id']}/answers/`,null,false,null,'application/json',(e)=>{handleAPICalls(e, 'loadApplication', step)},(e)=>{handleAPICalls(e, 'loadApplication', step)}); - } - break; - default: break; } diff --git a/src/data/property.app.json b/src/data/property.app.json index e412112..e71d93d 100644 --- a/src/data/property.app.json +++ b/src/data/property.app.json @@ -51,11 +51,6 @@ "id" : "card-0-body-1-list-3", "tag" : "p", "content" : "Check application status by saving the assigned application ID and logging in to the property intake form application." - }, - { - "id" : "card-0-body-1-list-4", - "tag" : "p", - "content" : "You can finish previously started applications by going to the Finish Previous Application section and providing your application ID." } ] }, @@ -69,17 +64,6 @@ "content" : "SAVE YOUR APPLICATION ID!" } ] - }, - { - "id" : "card-0-body-3", - "tag" : "p", - "content" : [ - { - "id" : "card-0-body-3-item-0", - "tag" : "strong", - "content" : "Incomplete applications will be saved in the system for 30 days." - } - ] } ] } @@ -125,17 +109,6 @@ "multiLogic" : false, "multiLogicOpts" : [], "specialTask" : null - }, - { - "validation" : "Finish Previous Application", - "validationType" : "equal", - "next" : 0, - "isSwitchingFormType" : true, - "formType" : "load", - "postingType" : null, - "multiLogic" : false, - "multiLogicOpts" : [], - "specialTask" : null } ] }, @@ -164,15 +137,6 @@ "description" : "Button to check past application status.", "text" : "Check Application Status", "label" : false - }, - { - "id" : "load", - "tag" : "button", - "type" : "submit", - "name" : "load", - "description" : "Load previous application.", - "text" : "Finish Previous Application", - "label" : false } ] } @@ -10835,262 +10799,5 @@ ] } } - ], - "load" : [ - { - "items" : { - "header": [ - { - "id": "load-application", - "text": "Load Application", - "logo": true, - "logoURL": "https://detroitmi.gov/themes/custom/detroitmi/logo-white.png", - "logoAlt": "City of Detroit", - "form": true - } - ], - "cards": [ - { - "id" : "load-0-card-0", - "type" : "center pop-up no-margin", - "title" : { - "type" : "Medium", - "value" : null - }, - "body" : { - "type" : "text", - "markup" : [ - { - "id" : "card-0-body-0", - "tag" : "p", - "content" : [ - { - "id" : "card-0-body-1-item-0", - "tag" : "strong", - "content" : "Instructions: " - }, - { - "id" : "card-0-body-1-item-1", - "tag" : "span", - "content" : "Please enter the ID of the application you wish to finish." - } - ] - } - ] - } - } - ], - "forms": [ - { - "id" : "load-0-form-0", - "type" : "input-submit", - "position" : "center", - "requirements" : { - "inputType" : "input-text", - "formTypeGlobal" : null, - "isSwitchingFormTypeGlobal" : null, - "needsNewID" : false, - "nextGlobal" : false, - "nextError" : 0, - "isPosting" : false, - "isGetting" : true, - "isPostingFullForm" : false, - "postingTypeGlobal" : "answers", - "isFinalStep" : false, - "logic": [] - }, - "text" : { - "type" : "text", - "markup" : [] - }, - "sections" : [ - { - "id" : "load-0-form-0-section-0", - "items" : [ - { - "id" : "app-id", - "tag" : "input", - "type" : "text", - "disabled" : false, - "value" : "", - "placeholder" : "Enter application ID", - "name" : "app-id", - "description" : "Applicatin ID provided when initial application was created.", - "text" : "", - "label" : true, - "labelText" : "App ID", - "labelPosition" : "before", - "required" : true - }, - { - "id" : "status-0-form-0-section-0-item-0", - "tag" : "button", - "type" : "submit", - "name" : "load", - "description" : "Load old application", - "text" : "Load", - "label" : false - } - ] - } - ] - } - ], - "hints": [ - { - "id" : "load-0-hint-0", - "type" : "hint color-1", - "title" : { - "type" : "small", - "value" : "HELPFUL HINTS AND TIPS:" - }, - "body" : { - "type" : "text", - "markup" : [ - { - "id" : "hint-0-body-0", - "tag" : "p", - "content" : "An application ID is provided when a new application is created." - } - ] - } - } - ] - } - }, - { - "items" : { - "header": [ - { - "id": "load-application", - "text": "Load Application", - "logo": true, - "logoURL": "https://detroitmi.gov/themes/custom/detroitmi/logo-white.png", - "logoAlt": "City of Detroit", - "form": true - } - ], - "cards": [ - { - "id" : "load-1-card-0", - "type" : "center pop-up color-2", - "title" : { - "type" : "Medium", - "value" : null - }, - "body" : { - "type" : "text", - "markup" : [ - { - "id" : "card-0-body-0", - "tag" : "p", - "content" : [ - { - "id" : "card-0-body-0-item-0", - "tag" : "strong", - "content" : "Good News. " - }, - { - "id" : "card-0-body-0-item-1", - "tag" : "span", - "content" : "Your application has been loaded successfully. You can now review, edit and submit your form." - } - ] - } - ] - } - } - ], - "forms": [ - { - "id" : "load-1-form-0", - "type" : "single-button", - "position" : "center", - "requirements" : { - "inputType" : "button", - "formTypeGlobal" : "application", - "isSwitchingFormTypeGlobal" : true, - "needsNewID" : false, - "historyOverrite" : [0,1], - "nextGlobal" : 2, - "isPosting" : false, - "isGetting" : true, - "isPostingFullForm" : false, - "postingTypeGlobal" : "answers", - "isFinalStep" : false, - "logic": [] - }, - "text" : { - "type" : "text", - "markup" : [] - }, - "sections" : [ - { - "id" : "load-1-form-0-section-0", - "items" : [ - { - "id" : "status-0-form-0-section-0-item-0", - "tag" : "button", - "type" : "submit", - "name" : "start-review", - "description" : "Start the application review.", - "text" : "Start Review", - "label" : false - } - ] - } - ] - } - ], - "hints": [] - } - }, - { - "items" : { - "header": [ - { - "id": "load-application", - "text": "Load Application", - "logo": true, - "logoURL": "https://detroitmi.gov/themes/custom/detroitmi/logo-white.png", - "logoAlt": "City of Detroit", - "form": true - } - ], - "cards": [ - { - "id" : "load-2-card-0", - "type" : "center pop-up color-3", - "title" : { - "type" : "Medium", - "value" : null - }, - "body" : { - "type" : "text", - "markup" : [ - { - "id" : "card-0-body-0", - "tag" : "p", - "content" : [ - { - "id" : "card-0-body-0-item-0", - "tag" : "strong", - "content" : "Finished Application: " - }, - { - "id" : "card-0-body-0-item-1", - "tag" : "span", - "content" : "This application has already been submitted for review. You are not able to make any edits at this point." - } - ] - } - ] - } - } - ], - "forms": [], - "hints": [] - } - } ] } \ No newline at end of file