Skip to content

Commit

Permalink
removed status based on fieldgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
JpadillaCoding committed Jun 6, 2024
1 parent c6b4fcf commit 145f3a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
7 changes: 3 additions & 4 deletions app/src/components/intake-profile/Sections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import {Link} from 'react-router-dom';
import useStatusStyling from '../../views/IntakeProfile/hooks/useStatusStyling';
import {useState} from 'react';

type Status = 'complete' | 'pending' | 'locked' | 'incomplete';

type FieldGroup = {
id: string;
title: string;
status: Status;
};

export const ProfileSection = ({
Expand Down Expand Up @@ -44,7 +41,9 @@ export const ProfileSection = ({
{0 /* needs to be implemented*/} of {totalTask}
</Typography>
</Stack>
{fieldGroups.map(({id, title, status}) => {
{fieldGroups.map(({id, title}) => {
const status = 'complete'; //change status here to see different styles
// complete | partial | incomplete | locked
const fieldTitle = title || '...';
return (
<Box
Expand Down
3 changes: 0 additions & 3 deletions app/src/services/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ type FieldTypeTuple = typeof fieldTypes;

export type FieldTypes = FieldTypeTuple[number];

export type TaskStatus = 'complete' | 'incomplete' | 'locked' | 'pending';

export interface Choice {
id: string;
label: string;
Expand Down Expand Up @@ -50,7 +48,6 @@ export interface FieldGroup {
id: string;
title: string;
fields: Fields[];
status: TaskStatus;
}

export interface Guest {
Expand Down
15 changes: 0 additions & 15 deletions app/src/utils/test/db/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Basic Information',
status: 'complete',
fields: [
{
id: faker.string.numeric(4),
Expand Down Expand Up @@ -63,7 +62,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Contact Information',
status: 'complete',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -88,7 +86,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Other Guests/Pets',
status: 'incomplete',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -111,7 +108,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Employment Information',
status: 'pending',
fields: [
{
id: '5478',
Expand Down Expand Up @@ -152,7 +148,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Education',
status: 'pending',
fields: [
{
id: '6478',
Expand Down Expand Up @@ -193,7 +188,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Language Proficiency',
status: 'pending',
fields: [
{
id: '5479',
Expand Down Expand Up @@ -221,7 +215,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Substance Use',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand Down Expand Up @@ -255,7 +248,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Mental Health',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -271,7 +263,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Interest in Being a Guest',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand Down Expand Up @@ -308,7 +299,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'About You',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -325,7 +315,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Review',
status: 'locked',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -346,7 +335,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Personal Information',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand Down Expand Up @@ -380,7 +368,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Contact Information',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand All @@ -405,7 +392,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Home Information',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand Down Expand Up @@ -442,7 +428,6 @@ export const intakeProfiles: GetProfileApiResponse[] = [
{
id: faker.string.numeric(4),
title: 'Restrictions',
status: 'pending',
fields: [
{
id: faker.string.numeric(4),
Expand Down
4 changes: 2 additions & 2 deletions app/src/views/IntakeProfile/hooks/useStatusStyling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const useStatusStyling = () => {
borderColor: '#EAF2EA',
shadow: 'grey.50',
},
pending: {
incomplete: {
icon: null,
color: theme.palette.primary.contrastText,
borderColor: 'grey.50',
Expand All @@ -25,7 +25,7 @@ const useStatusStyling = () => {
borderColor: 'grey.50',
shadow: 'grey.50',
},
incomplete: {
partial: {
icon: <InProgressIcon />,
color: theme.palette.primary.contrastText,
borderColor: 'grey.50',
Expand Down

0 comments on commit 145f3a2

Please sign in to comment.