Skip to content

Commit

Permalink
Merge pull request #112 from ConductionNL/styling-fix
Browse files Browse the repository at this point in the history
lint-fix
  • Loading branch information
remko48 authored Dec 18, 2024
2 parents 1ba4e29 + d102f0c commit 5784cfe
Show file tree
Hide file tree
Showing 20 changed files with 276 additions and 324 deletions.
4 changes: 2 additions & 2 deletions src/entities/klanten/klanten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class Klant implements TKlant {
public achternaam: string
public bsn: string
public geboortedatum: string
public geslacht: "man" | "vrouw" | "overige"
public geslacht: 'man' | 'vrouw' | 'overige'
public land: string

public telefoonnummer: string
Expand Down Expand Up @@ -71,7 +71,7 @@ export class Klant implements TKlant {
achternaam: z.string(),
bsn: z.string(),
geboortedatum: z.string(),
geslacht: z.enum(["man", "vrouw", "overige"]).or(z.null()),
geslacht: z.enum(['man', 'vrouw', 'overige']).or(z.null()),
land: z.string(),
telefoonnummer: z.string(),
emailadres: z.string().email(),
Expand Down
3 changes: 2 additions & 1 deletion src/entities/medewerkers/medewerkers.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export const mockMedewerkerData = (): TMedewerker[] => [
},
]

export const mockMedewerker = (data: TMedewerker[] = mockMedewerkerData()): TMedewerker[] => data.map(item => new Medewerker(item))
export const mockMedewerker = (data: TMedewerker[] = mockMedewerkerData()): TMedewerker[] =>
data.map((item) => new Medewerker(item))
14 changes: 7 additions & 7 deletions src/entities/medewerkers/medewerkers.types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export type TMedewerker = {
id: string;
voornaam: string;
tussenvoegsel: string;
achternaam: string;
email: string;
telefoonnummer: string;
}
id: string;
voornaam: string;
tussenvoegsel: string;
achternaam: string;
email: string;
telefoonnummer: string;
};
113 changes: 60 additions & 53 deletions src/modals/contactMomenten/ContactMomentenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,28 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
<NcNoteCard type="info" class="noteCard">
<template #default>
<div v-if="contactMomenten[i].klant">
{{ `${getSex(contactMomenten[i].klant)} ${getName(contactMomenten[i].klant)}` }}
<div v-if="contactMomenten[i].klant?.type === 'persoon'" class="flexContainer">
{{ `${getSex(contactMomenten[i].klant)}
${getName(contactMomenten[i].klant)}` }}
<div v-if="contactMomenten[i].klant?.type === 'persoon'"
class="flexContainer">
<div>
Geboortedatum: {{ getValidISOstring(contactMomenten[i].klant?.geboortedatum) ? new Date(contactMomenten[i].klant?.geboortedatum).toLocaleDateString() : 'N/A' }}
Geboortedatum: {{
getValidISOstring(contactMomenten[i].klant?.geboortedatum) ? new
Date(contactMomenten[i].klant?.geboortedatum).toLocaleDateString() :
'N/A' }}
</div>
<div>
Geboorteplaats: {{ contactMomenten[i].klant?.plaats ?? 'N/A' }}
</div>
</div>
<div v-if="contactMomenten[i].klant?.type === 'organisatie'" class="flexContainer">
<div v-if="contactMomenten[i].klant?.type === 'organisatie'"
class="flexContainer">
<div>
KVK: {{ contactMomenten[i].klant?.kvkNummer ?? 'N/A' }}
</div>
<div>
Locatie: {{ contactMomenten[i].klant?.postcode ?? 'N/A' }} {{ contactMomenten[i].klant?.straatnaam ?? 'N/A' }}
Locatie: {{ contactMomenten[i].klant?.postcode ?? 'N/A' }} {{
contactMomenten[i].klant?.straatnaam ?? 'N/A' }}
</div>
</div>
</div>
Expand All @@ -55,8 +62,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</div>
<div v-if="!contactMomenten[i].klant" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="openSearchKlantModal('persoon')">
Expand All @@ -70,8 +76,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
of
</div>
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="openSearchKlantModal('organisatie')">
Expand All @@ -85,8 +90,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..

<div v-if="contactMomenten[i].klant && !isView" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="contactMomenten[i].klant = null">
Expand Down Expand Up @@ -116,9 +120,11 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</div>
<div class="tabContainer">
<BTabs content-class="mt-3" justified>
<BTab :title="`Contactmomenten ${contactMomenten[i].klant ? (contactMomenten[i].klantContactmomenten?.length ? `(${contactMomenten[i].klantContactmomenten.length})` : '(0)') : ''}`">
<BTab
:title="`Contactmomenten ${contactMomenten[i].klant ? (contactMomenten[i].klantContactmomenten?.length ? `(${contactMomenten[i].klantContactmomenten.length})` : '(0)') : ''}`">
<div v-if="contactMomenten[i].klantContactmomenten?.length">
<NcListItem v-for="(klantContactmoment, key) in contactMomenten[i].klantContactmomenten"
<NcListItem
v-for="(klantContactmoment, key) in contactMomenten[i].klantContactmomenten"
:key="key"
:name="getName(contactMomenten[i].klant)"
:bold="false"
Expand All @@ -139,7 +145,8 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</template>
</NcEmptyContent>
</BTab>
<BTab :title="`Zaken ${contactMomenten[i].klant ? (contactMomenten[i].zaken?.length ? `(${contactMomenten[i].zaken.length})` : '(0)') : ''}`">
<BTab
:title="`Zaken ${contactMomenten[i].klant ? (contactMomenten[i].zaken?.length ? `(${contactMomenten[i].zaken.length})` : '(0)') : ''}`">
<div v-if="contactMomenten[i].zaken?.length">
<NcListItem v-for="(zaak, key) in contactMomenten[i].zaken"
:key="key"
Expand All @@ -165,7 +172,8 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</template>
</NcEmptyContent>
</BTab>
<BTab :title="`Taken ${contactMomenten[i].klant ? (contactMomenten[i].taken?.length ? `(${contactMomenten[i].taken.length})` : '(0)') : ''}`">
<BTab
:title="`Taken ${contactMomenten[i].klant ? (contactMomenten[i].taken?.length ? `(${contactMomenten[i].taken.length})` : '(0)') : ''}`">
<div v-if="contactMomenten[i].taken?.length">
<NcListItem v-for="(taak, key) in contactMomenten[i].taken"
:key="key"
Expand All @@ -192,9 +200,11 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</template>
</NcEmptyContent>
</BTab>
<BTab :title="`Producten ${contactMomenten[selectedContactMoment].klant ? (contactMomenten[selectedContactMoment].klant?.producten?.length ? `(${contactMomenten[selectedContactMoment].klant?.producten?.length})` : '(0)') : ''}`">
<BTab
:title="`Producten ${contactMomenten[selectedContactMoment].klant ? (contactMomenten[selectedContactMoment].klant?.producten?.length ? `(${contactMomenten[selectedContactMoment].klant?.producten?.length})` : '(0)') : ''}`">
<div v-if="contactMomenten[selectedContactMoment].klant?.producten?.length">
<NcListItem v-for="(product, key) in contactMomenten[selectedContactMoment].klant.producten"
<NcListItem
v-for="(product, key) in contactMomenten[selectedContactMoment].klant.producten"
:key="key"
:name="product.naam ?? 'N/A'"
:bold="false"
Expand Down Expand Up @@ -224,9 +234,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
@selected-klant="fetchKlantData($event)"
@close-modal="closeSearchKlantModal" />
</div>
<NcButton
v-if="tabs.length > 1 && !success"
@click="closeTab(i)">
<NcButton v-if="tabs.length > 1 && !success" @click="closeTab(i)">
Close tab
</NcButton>
</BTab>
Expand Down Expand Up @@ -257,7 +265,8 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
{{ `${getSex(klant)} ${getName(klant)}` }}
<div v-if="klant?.type === 'persoon'" class="flexContainer">
<div>
Geboortedatum: {{ getValidISOstring(klant?.geboortedatum) ? new Date(klant?.geboortedatum).toLocaleDateString() : 'N/A' }}
Geboortedatum: {{ getValidISOstring(klant?.geboortedatum) ? new
Date(klant?.geboortedatum).toLocaleDateString() : 'N/A' }}
</div>
<div>
Geboorteplaats: {{ klant?.plaats ?? 'N/A' }}
Expand All @@ -280,8 +289,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</div>
<div v-if="!klant" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="openSearchKlantModal('persoon')">
Expand All @@ -295,8 +303,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
of
</div>
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="openSearchKlantModal('organisatie')">
Expand All @@ -310,8 +317,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..

<div v-if="klant && !isView" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
<NcButton :disabled="loading"
:loading="fetchLoading"
type="primary"
@click="klant = null">
Expand Down Expand Up @@ -341,7 +347,8 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</div>
<div class="tabContainer">
<BTabs content-class="mt-3" justified>
<BTab :title="`Contactmomenten ${klant ? (klantContactmomenten.length ? `(${klantContactmomenten.length})` : '(0)') : ''}`">
<BTab
:title="`Contactmomenten ${klant ? (klantContactmomenten.length ? `(${klantContactmomenten.length})` : '(0)') : ''}`">
<div v-if="klantContactmomenten.length">
<NcListItem v-for="(klantContactmoment, key) in klantContactmomenten"
:key="key"
Expand Down Expand Up @@ -415,7 +422,8 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</template>
</NcEmptyContent>
</BTab>
<BTab :title="`Producten ${klant ? (klant?.producten?.length ? `(${klant?.producten?.length})` : '(0)') : ''}`">
<BTab
:title="`Producten ${klant ? (klant?.producten?.length ? `(${klant?.producten?.length})` : '(0)') : ''}`">
<div v-if="klant?.producten?.length">
<NcListItem v-for="(product, key) in klant.producten"
:key="key"
Expand Down Expand Up @@ -448,10 +456,7 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</div>
</div>
<template #actions>
<NcButton
:disabled="loading || success"
type="secondary"
@click="closeModal()">
<NcButton :disabled="loading || success" type="secondary" @click="closeModal()">
<template #icon>
<Cancel :size="20" />
</template>
Expand Down Expand Up @@ -482,15 +487,16 @@ import { contactMomentStore, navigationStore, taakStore, zaakStore } from '../..
</template>
Zaak starten
</NcActionButton>
<NcActionButton v-if="isView" :disabled="contactMoment.status === 'gesloten'" @click="closeContactMoment(contactMoment.id)">
<NcActionButton v-if="isView"
:disabled="contactMoment.status === 'gesloten'"
@click="closeContactMoment(contactMoment.id)">
<template #icon>
<ProgressClose :size="20" />
</template>
Sluit Contactmoment
</NcActionButton>
</NcActions>
<NcButton
v-if="!isView"
<NcButton v-if="!isView"
type="primary"
:disabled="!contactMomenten[selectedContactMoment].klant || loading || success || fetchLoading"
:loading="loading"
Expand Down Expand Up @@ -974,54 +980,55 @@ div[class='modal-container']:has(.ContactMomentenForm) {
<style scoped>
.rolDetailsContainer {
margin-block-start: var(--zaa-margin-20);
margin-inline-start: var(--zaa-margin-20);
margin-inline-end: var(--zaa-margin-20);
margin-block-start: var(--zaa-margin-20);
margin-inline-start: var(--zaa-margin-20);
margin-inline-end: var(--zaa-margin-20);
}
.success {
color: green;
color: green;
}
.headerContainer {
display: flex;
gap: 200px;
display: flex;
gap: 200px;
}
.noteCard {
min-width: 350px;
min-width: 350px;
}
.orContainer {
margin-inline: var(--zaa-margin-10);
margin-inline: var(--zaa-margin-10);
}
.buttonsContainer {
display: flex;
align-items: center;
display: flex;
align-items: center;
}
.form-group {
margin-block-end: 100px;
margin-block-end: 100px;
}
.tabContainer {
margin-block-end: var(--zaa-margin-20);
margin-block-end: var(--zaa-margin-20);
}
.newTabButton > a {
.newTabButton>a {
display: flex;
justify-content: center;
align-items: center;
}
.modalButtonsContainer {
display: flex;
justify-content: flex-end;
gap: var(--zaa-margin-10);
display: flex;
justify-content: flex-end;
gap: var(--zaa-margin-10);
}
.flexContainer, .statusContainer {
.flexContainer,
.statusContainer {
display: flex;
gap: var(--zaa-margin-10);
}
Expand Down
Loading

0 comments on commit 5784cfe

Please sign in to comment.