Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OK-436 #53

Merged
merged 12 commits into from
Sep 19, 2024
Merged

OK-436 #53

merged 12 commits into from
Sep 19, 2024

Conversation

marjakari
Copy link
Contributor

@marjakari marjakari commented Sep 16, 2024

Listaus lähettävistä palveluista bäkkäriin.

  • haetaan lähetyksistä joita voi olla iso massa, mutta en lähtenyt ennenaikaiseen optimointiin
  • toistaiseksi ei ole tehty erillistä aputaulua vaan lisätty indeksointi

Lähettävät palvelut käliin hakukriteeriksi.

  • Kälisuunnitelman mukaan select-valikko. Jos tulee jossain kohtaa pitempi lista, voinee harkita autocompletea
  • otettu samalla käyttöön uusi versio oph-design-systemistä ja OphSelect-komponentti
  • Mukailtu OphFormControl-komponentti uudesta valintakälistä - jossain kohti design systemiin

Pohjana branch OK-606_haku joka ei ole vielä mainissa, koska hakutoiminnot sisältävät kantamuutoksia joita vielä testataan QA:lla ja vietävä hallitusti tuotantoon.

onChange: (e: SelectChangeEvent) => void;
}) => {
const { t } = useTranslation();
// eslint-disable-next-line @typescript-eslint/no-unused-vars

Choose a reason for hiding this comment

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

Miksi? Et näytä käyttävän erroria ja refetchiä tos, etkö voi vaan jättää ne pois?

margin: theme.spacing(0.5, 0),
}));

const EMPTY_ARRAY: Array<unknown> = [];

Choose a reason for hiding this comment

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

tästä vois tehdä constantin jos koet tarvitsevasi useammin. Myös jos on tarkoitus ettei tuota voi mutiloida niin Petteri otti käyttöön meidän projussa Object.freeze([]) as Array;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tuo oli itse asiassa teidän projektista apinoitu mut ei tainnut sit olla tuorein versio käsillä 😄 ja pistin sen nyt toistaiseksi tuohon vakioks kun ei ollut muualla vielä käyttöä

@@ -23,7 +23,8 @@ import { SearchParams } from 'nuqs/server';
import { searchParamsCache } from '@/app/lib/searchParams';
import { initTranslations } from '@/app/i18n/localization';
/* eslint-disable @typescript-eslint/no-explicit-any */

Choose a reason for hiding this comment

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

Voiko tän poistaa?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Näköjään voi

@@ -227,3 +230,25 @@ export async function searchOrganisaatio(searchStr: string): Promise<Organisaati
}
return res.json();
}

export async function fetchLahettavatPalvelut(): Promise<string[]> {
const sessionCookie = cookies().get(cookieName);

Choose a reason for hiding this comment

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

Tätä login toiminnallisuutta vois handlata tekemällä oman fetch funktion joka syövereissänsä kutsuu tuota oikeata fetchiä. Sillä saat saman kirjautumispäättely toiminnallisuuden kaikkialle.

@marjakari marjakari merged commit 5f95539 into OK-606_haku Sep 19, 2024
3 checks passed
@marjakari marjakari deleted the OK-436 branch September 19, 2024 12:55
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.

2 participants