Skip to content

Commit

Permalink
Merge pull request #64 from ConductionNL/development
Browse files Browse the repository at this point in the history
Development to main
  • Loading branch information
remko48 authored Dec 2, 2024
2 parents da4b0c0 + 84b71a3 commit 4c804a0
Show file tree
Hide file tree
Showing 42 changed files with 964 additions and 504 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow(nightly).yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
echo "VERSION=${nightly_version}" >> $GITHUB_ENV
else
echo "VERSION=${current_version}" >> $GITHUB_ENV
fi
# - name: Update version in info.xml
# run: |
Expand Down Expand Up @@ -186,8 +187,7 @@ jobs:
appstore_token: ${{ secrets.NEXTCLOUD_APPSTORE_TOKEN }}
download_url: https://github.com/${{ github.repository }}/releases/download/v${{ env.NEW_VERSION }}/${{ env.APP_NAME }}-${{ env.NEW_VERSION }}.tar.gz
app_private_key: ${{ secrets.NEXTCLOUD_SIGNING_KEY }}
nightly: false

nightly: true
- name: Verify version and contents
run: |
echo "App version: ${{ env.NEW_VERSION }}"
Expand Down
5 changes: 5 additions & 0 deletions img/progress-close-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions img/progress-close-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/entities/contactmoment/contactmoment.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const mockContactMomentData = (): TContactMoment[] => [
taak: 'Taak 3',
product: 'Product 3',
startDate: new Date().toISOString(),
status: 'open',
},
]

Expand Down
3 changes: 3 additions & 0 deletions src/entities/contactmoment/contactmoment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class ContactMoment implements TContactMoment {
public taak: string
public product: string
public startDate: string
public status: string

constructor(source: TContactMoment) {
this.id = source.id || ''
Expand All @@ -23,6 +24,7 @@ export class ContactMoment implements TContactMoment {
this.taak = source.taak || ''
this.product = source.product || ''
this.startDate = source.startDate || ''
this.status = source.status || 'open'
}

public validate(): SafeParseReturnType<TContactMoment, unknown> {
Expand All @@ -36,6 +38,7 @@ export class ContactMoment implements TContactMoment {
taak: z.string().min(1),
product: z.string().min(1),
startDate: z.string().min(1),
status: z.string().min(1),
})

return schema.safeParse(this)
Expand Down
1 change: 1 addition & 0 deletions src/entities/contactmoment/contactmoment.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export type TContactMoment = {
taak: string;
product: string;
startDate: string;
status: string;
}
1 change: 1 addition & 0 deletions src/entities/klanten/klanten.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const mockKlantData = (): TKlant[] => [
achternaam: 'Doe',
bsn: '1234567890',
geboortedatum: '1990-01-01',
isMale: true,
land: 'Nederland',
telefoonnummer: '0612345678',
emailadres: '[email protected]',
Expand Down
3 changes: 3 additions & 0 deletions src/entities/klanten/klanten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class Klant implements TKlant {
public achternaam: string
public bsn: string
public geboortedatum: string
public isMale: boolean
public land: string

public telefoonnummer: string
Expand Down Expand Up @@ -41,6 +42,7 @@ export class Klant implements TKlant {
this.achternaam = source.achternaam || ''
this.bsn = source.bsn || ''
this.geboortedatum = source.geboortedatum || ''
this.isMale = source.isMale || false
this.land = source.land || ''
this.telefoonnummer = source.telefoonnummer || ''
this.emailadres = source.emailadres || ''
Expand Down Expand Up @@ -69,6 +71,7 @@ export class Klant implements TKlant {
achternaam: z.string(),
bsn: z.string(),
geboortedatum: z.string(),
isMale: z.boolean(),
land: z.string(),
telefoonnummer: z.string(),
emailadres: z.string().email(),
Expand Down
1 change: 1 addition & 0 deletions src/entities/klanten/klanten.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type TKlant = {
achternaam: string;
bsn: string;
geboortedatum: string;
isMale: boolean;
land: string;
telefoonnummer: string;
emailadres: string;
Expand Down
1 change: 1 addition & 0 deletions src/entities/rol/rol.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { TRol } from './rol.types'

export const mockRolData = (): TRol[] => [
{
id: '1',
uuid: '15551d6f-44e3-43f3-a9d2-59e583c91eb0',
omschrijving: 'Zaak 3',
omschrijvingGeneriek: 'Zaak 3',
Expand Down
3 changes: 3 additions & 0 deletions src/entities/rol/rol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { TRol } from './rol.types'

export class Rol implements TRol {

public id: string
public uuid: string
public omschrijving: string
public omschrijvingGeneriek: string
Expand Down Expand Up @@ -37,6 +38,7 @@ export class Rol implements TRol {
}

constructor(source: TRol) {
this.id = source.id || null
this.uuid = source.uuid || ''
this.omschrijving = source.omschrijving || ''
this.omschrijvingGeneriek = source.omschrijvingGeneriek || ''
Expand All @@ -57,6 +59,7 @@ export class Rol implements TRol {

public validate(): SafeParseReturnType<TRol, unknown> {
const schema = z.object({
id: z.string().optional(),
uuid: z.string().optional(),
omschrijving: z.string().min(1),
omschrijvingGeneriek: z.string(),
Expand Down
1 change: 1 addition & 0 deletions src/entities/rol/rol.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export type TRol = {
id?: string;
uuid: string;
omschrijving: string;
omschrijvingGeneriek: string;
Expand Down
1 change: 1 addition & 0 deletions src/entities/taak/taak.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const mockTaakData = (): TTaak[] => [
zaak: '15551d6f-44e3-43f3-a9d2-59e583c91eb0',
type: 'Audit',
status: 'verwerkt',
deadline: '2024-12-01T00:00:00.000Z',
onderwerp: 'Uitvoering van een interne audit om de naleving van kwaliteitsnormen te controleren.',
toelichting: 'Deze taak omvat het uitvoeren van een gedetailleerde interne audit van de bedrijfsprocessen om te controleren of alle afdelingen voldoen aan de vastgestelde kwaliteitsnormen. De bevindingen worden gedocumenteerd en er worden aanbevelingen gedaan voor verbeteringen.',
actie: 'Voorbereiden van auditchecklist, uitvoeren van audits, rapporteren van bevindingen, aanbevelen van verbeteringen.',
Expand Down
4 changes: 4 additions & 0 deletions src/entities/taak/taak.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SafeParseReturnType, z } from 'zod'
import { TTaak, ZaakID } from './taak.types'
import getValidISOstring from '../../services/getValidISOstring'

export class Taak implements TTaak {

Expand All @@ -8,6 +9,7 @@ export class Taak implements TTaak {
public zaak: ZaakID
public type: string
public status: string
public deadline: string
public onderwerp: string
public toelichting: string
public actie: string
Expand All @@ -19,6 +21,7 @@ export class Taak implements TTaak {
this.zaak = source.zaak || ''
this.type = source.type || ''
this.status = source.status || ''
this.deadline = source.deadline ? getValidISOstring(source.deadline) : null
this.onderwerp = source.onderwerp || ''
this.toelichting = source.toelichting || ''
this.actie = source.actie || ''
Expand All @@ -32,6 +35,7 @@ export class Taak implements TTaak {
zaak: z.string().min(1),
type: z.string().min(1),
status: z.string().min(1),
deadline: z.string().datetime().nullable(),
onderwerp: z.string().min(1),
toelichting: z.string(),
actie: z.string(),
Expand Down
1 change: 1 addition & 0 deletions src/entities/taak/taak.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type TTaak = {
zaak: ZaakID;
type: string;
status: string;
deadline: string;
onderwerp: string;
toelichting: string;
actie: string;
Expand Down
45 changes: 39 additions & 6 deletions src/modals/contactMomenten/ContactMomentenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { navigationStore } from '../../store/store.js'
</div>
</template>
</NcNoteCard>
<div class="buttonsContainer">
<div v-if="!klant" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
Expand All @@ -56,7 +56,22 @@ import { navigationStore } from '../../store/store.js'
</NcButton>
</div>
</div>

<div v-if="klant" class="buttonsContainer">
<div>
<NcButton
:disabled="loading"
type="primary"
@click="klant = null">
<template #icon>
<Minus :size="20" />
</template>
Klant ontkoppelen
</NcButton>
</div>
</div>
</div>

<div v-if="!success" class="form-group">
<NcTextArea v-model="notitie"
label="Notitie"
Expand Down Expand Up @@ -208,6 +223,7 @@ import CalendarMonthOutline from 'vue-material-design-icons/CalendarMonthOutline
import ContentSaveOutline from 'vue-material-design-icons/ContentSaveOutline.vue'
import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
import Cancel from 'vue-material-design-icons/Cancel.vue'
import Minus from 'vue-material-design-icons/Minus.vue'
export default {
name: 'ContactMomentenForm',
Expand Down Expand Up @@ -322,37 +338,54 @@ export default {
.then(response => response.json())
.then(data => {
this.klant = data
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/zaken`)
})
.catch(error => {
console.error('Error fetching klant:', error)
throw error // if this one fails, fetching the rest is pointless
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/zaken`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data.results)) {
this.zaken = data.results
}
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/taken`)
})
.catch(error => {
console.error('Error fetching klant zaken:', error)
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/taken`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data.results)) {
this.taken = data.results
}
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/berichten`)
})
.catch(error => {
console.error('Error fetching klant taken:', error)
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/berichten`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data.results)) {
this.berichten = data.results
}
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/audit_trail`)
})
.catch(error => {
console.error('Error fetching klant berichten:', error)
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/audit_trail`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data)) {
this.auditTrails = data
}
})
.catch(error => {
console.error('Error fetching klant data:', error)
console.error('Error fetching klant audit trail:', error)
})
},
Expand Down
20 changes: 14 additions & 6 deletions src/modals/klantRegister/ViewKlantRegister.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { taakStore, navigationStore, zaakStore, klantStore } from '../../store/s
</h1>
<div class="detailGrid">
<div class="gridContent gridFullWidth">
<b>Klantnummer:</b>
<p>{{ klant.klantnummer || '-' }}</p>
<b>KVK nummer:</b>
<p>{{ klant.kvkNummer || '-' }}</p>
</div>

<div class="gridContent">
Expand All @@ -26,7 +26,7 @@ import { taakStore, navigationStore, zaakStore, klantStore } from '../../store/s
</div>
<div class="gridContent">
<b>Adres:</b>
<p>{{ klant.adres || '-' }}</p>
<p>{{ `${klant.straatnaam} ${klant.huisnummer} ${klant.postcode} ${klant.plaats}` || '-' }}</p>
</div>
<div class="gridContent">
<b>Functie:</b>
Expand Down Expand Up @@ -295,23 +295,31 @@ export default {
if (Array.isArray(data.results)) {
this.zaken = data.results
}
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/taken`)
})
.catch(error => {
console.error('Error fetching zaken:', error)
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/taken`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data.results)) {
this.taken = data.results
}
return fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/berichten`)
})
.catch(error => {
console.error('Error fetching taken:', error)
})
fetch(`/index.php/apps/zaakafhandelapp/api/klanten/${id}/berichten`)
.then(response => response.json())
.then(data => {
if (Array.isArray(data.results)) {
this.berichten = data.results
}
})
.catch(error => {
console.error('Error fetching klant data:', error)
console.error('Error fetching berichten:', error)
})
},
Expand Down
8 changes: 8 additions & 0 deletions src/modals/klanten/EditKlant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import { klantStore, navigationStore } from '../../store/store.js'
:disabled="loading"
input-label="Geboortedatum" />
</div>
<NcCheckboxRadioSwitch :checked.sync="klantItem.isMale">
Is een man?
</NcCheckboxRadioSwitch>
<NcSelect
v-bind="countryOptions"
v-model="klantItem.land"
Expand Down Expand Up @@ -177,6 +180,7 @@ import {
NcNoteCard,
NcSelect,
NcDateTimePicker,
NcCheckboxRadioSwitch,
} from '@nextcloud/vue'
import { countries } from '../../data/countries.js'
Expand All @@ -196,6 +200,7 @@ export default {
NcNoteCard,
NcSelect,
NcDateTimePicker,
NcCheckboxRadioSwitch,
// Icons
ContentSaveOutline,
Cancel,
Expand All @@ -221,6 +226,7 @@ export default {
achternaam: '',
bsn: '',
geboortedatum: '',
isMale: false,
land: '',
telefoonnummer: '',
emailadres: '',
Expand Down Expand Up @@ -269,6 +275,7 @@ export default {
achternaam: klantStore.klantItem.achternaam || '',
bsn: klantStore.klantItem.bsn || '',
geboortedatum: klantStore.klantItem.geboortedatum ? new Date(klantStore.klantItem.geboortedatum) : '',
isMale: klantStore.klantItem.isMale || false,
land: country || '',
telefoonnummer: klantStore.klantItem.telefoonnummer || '',
emailadres: klantStore.klantItem.emailadres || '',
Expand Down Expand Up @@ -306,6 +313,7 @@ export default {
achternaam: '',
bsn: '',
geboortedatum: '',
isMale: false,
land: '',
telefoonnummer: '',
emailadres: '',
Expand Down
Loading

0 comments on commit 4c804a0

Please sign in to comment.