Skip to content

Adds persistence to registrations and categories#20

Open
madsthom wants to merge 1 commit into
mainfrom
time-smart-endpoints
Open

Adds persistence to registrations and categories#20
madsthom wants to merge 1 commit into
mainfrom
time-smart-endpoints

Conversation

@madsthom

@madsthom madsthom commented Dec 6, 2021

Copy link
Copy Markdown
Contributor

Hej. Denne PR tilføjer følgende:

  • Registrations bliver nu gemt på db.
  • Categories kommer fra db og kan gemmes på db.
  • Registrations bliver nu vist baseret på order ID

Hvad denne PR IKKE tilføjer:

  • God kode
  • Test der parser
  • Wrapper ikke open API services i vores egne funktioner
  • Alt sker lige nu i useEffects(). Håbede på der var en bedre måde, men vi kunne ikke lige finde den.

Bedste hilsner,
Ida og Mads 🎅🏿 🧑🏿‍🎄

@madsthom madsthom requested review from AndersSpringborg and removed request for AndersSpringborg December 6, 2021 13:30
@netlify

netlify Bot commented Dec 6, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for business-assistant ready!

🔨 Explore the source changes: 7038a52

🔍 Inspect the deploy log: https://app.netlify.com/sites/business-assistant/deploys/61ae107fdef3b000074dd5d8

😎 Browse the preview: https://deploy-preview-20--business-assistant.netlify.app

@AndersSpringborg AndersSpringborg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Det var da overhovedet ikke dårlig kode 👍🏼 🥇 🍆

}

export function tableRowDisplay(registrations: registration[]): tableRow[] {
console.log(registrations);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er det en glem log, eller en der skal laves om til vores log ting

Comment on lines +19 to 21
export function getRegistrations(): registration[] {
return [];
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function getRegistrations(): registration[] {
return [];
}

export const registrationsState = atom({
key: "registrations",
default: getCategoriesAPICall(),
default: getRegistrations(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: getRegistrations(),
default: [],


//const Registrations = useRecoilValue(RegistrationState);
useEffect(() => {
console.log(order.id);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samme med log her

Comment on lines +10 to 12
export function getCategoriesAPICall(): CategoryDTO[] {
return [] as CategoryDTO[];
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function getCategoriesAPICall(): CategoryDTO[] {
return [] as CategoryDTO[];
}


export const categoriesState = atom({
key: "categories",
default: getCategoriesAPICall(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: getCategoriesAPICall(),
default: [],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants