From 404295ae8d304c88c75e666ba899167c0722f71f Mon Sep 17 00:00:00 2001 From: Thijn Date: Wed, 23 Oct 2024 17:17:34 +0200 Subject: [PATCH 01/14] finished klanten search --- src/sidebars/search/SearchSideBar.vue | 144 ++++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 6 deletions(-) diff --git a/src/sidebars/search/SearchSideBar.vue b/src/sidebars/search/SearchSideBar.vue index 2a55df2..498fd70 100644 --- a/src/sidebars/search/SearchSideBar.vue +++ b/src/sidebars/search/SearchSideBar.vue @@ -1,5 +1,5 @@ + + + + + diff --git a/src/views/zaken/ZakenList.vue b/src/views/zaken/ZakenList.vue index faa6f6b..afc9a58 100644 --- a/src/views/zaken/ZakenList.vue +++ b/src/views/zaken/ZakenList.vue @@ -31,7 +31,7 @@ import { navigationStore, zaakStore } from '../../store/store.js' -
+
Date: Tue, 12 Nov 2024 15:22:06 +0100 Subject: [PATCH 04/14] cleanup --- src/modals/berichten/EditBericht.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modals/berichten/EditBericht.vue b/src/modals/berichten/EditBericht.vue index 68e8242..5233077 100644 --- a/src/modals/berichten/EditBericht.vue +++ b/src/modals/berichten/EditBericht.vue @@ -6,7 +6,7 @@ import { berichtStore, navigationStore, klantStore } from '../../store/store.js' + @closing="closeModalFromButton()">

Bericht succesvol aangepast

From 672a215a7920751a441e4d0c7dc10e4037a32ac9 Mon Sep 17 00:00:00 2001 From: Remko Date: Wed, 13 Nov 2024 10:01:54 +0100 Subject: [PATCH 05/14] Added requested changes --- src/views/berichten/BerichtenList.vue | 2 +- src/views/klanten/KlantenList.vue | 10 +--------- src/views/statussen/StatussenIndex.vue | 3 +-- src/views/taken/TakenList.vue | 2 +- src/views/zaakTypen/ZaakTypenList.vue | 2 +- src/views/zaken/ZakenList.vue | 2 +- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/views/berichten/BerichtenList.vue b/src/views/berichten/BerichtenList.vue index cee06a4..98d0da0 100644 --- a/src/views/berichten/BerichtenList.vue +++ b/src/views/berichten/BerichtenList.vue @@ -30,7 +30,7 @@ import { navigationStore, berichtStore } from '../../store/store.js'
-
+
-
+
Bewerken - - - Verwijderen -
@@ -86,7 +80,6 @@ import AccountOutline from 'vue-material-design-icons/AccountOutline.vue' import Refresh from 'vue-material-design-icons/Refresh.vue' import Plus from 'vue-material-design-icons/Plus.vue' import Pencil from 'vue-material-design-icons/Pencil.vue' -import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue' export default { name: 'KlantenList', @@ -101,7 +94,6 @@ export default { AccountOutline, Magnify, Pencil, - TrashCanOutline, }, data() { return { diff --git a/src/views/statussen/StatussenIndex.vue b/src/views/statussen/StatussenIndex.vue index b6ec9fc..08aa73f 100644 --- a/src/views/statussen/StatussenIndex.vue +++ b/src/views/statussen/StatussenIndex.vue @@ -30,8 +30,7 @@ import { navigationStore } from '../../store/store.js' import { NcAppContent, NcEmptyContent, NcButton } from '@nextcloud/vue' import StatussenList from './StatussenList.vue' import StatusDetails from './StatusDetails.vue' -// eslint-disable-next-line n/no-missing-import -import BriefcaseAccountOutline from 'vue-material-design-icons/BriefcaseAccountOutline' +import BriefcaseAccountOutline from 'vue-material-design-icons/BriefcaseAccountOutline.vue' export default { name: 'StatussenIndex', diff --git a/src/views/taken/TakenList.vue b/src/views/taken/TakenList.vue index 22290cc..276b5b9 100644 --- a/src/views/taken/TakenList.vue +++ b/src/views/taken/TakenList.vue @@ -30,7 +30,7 @@ import { navigationStore, taakStore } from '../../store/store.js'
-
+
-
+
-
+
Date: Wed, 13 Nov 2024 13:58:06 +0100 Subject: [PATCH 06/14] Added personen and organisaties widgets --- lib/AppInfo/Application.php | 4 + lib/Dashboard/OrganisatiesWidget.php | 69 ++++++++++ lib/Dashboard/PersonenWidget.php | 69 ++++++++++ package-lock.json | 2 +- package.json | 3 +- src/entities/klanten/klanten.mock.ts | 1 + src/entities/klanten/klanten.ts | 4 +- src/entities/klanten/klanten.types.ts | 3 + src/modals/klanten/EditKlant.vue | 24 +++- src/organisatiesWidget.js | 10 ++ src/personenWidget.js | 10 ++ src/store/modules/klanten.js | 53 ++++++++ src/views/klanten/KlantenList.vue | 28 +++- src/views/widgets/ContactMomentenWidget.vue | 5 +- src/views/widgets/OpenZakenWidget.vue | 5 +- src/views/widgets/OrganisatiesWidget.vue | 135 +++++++++++++++++++ src/views/widgets/PersonenWidget.vue | 137 ++++++++++++++++++++ src/views/widgets/TakenWidget.vue | 5 +- src/views/widgets/ZakenWidget.vue | 12 +- webpack.config.js | 8 ++ 20 files changed, 570 insertions(+), 17 deletions(-) create mode 100644 lib/Dashboard/OrganisatiesWidget.php create mode 100644 lib/Dashboard/PersonenWidget.php create mode 100644 src/organisatiesWidget.js create mode 100644 src/personenWidget.js create mode 100644 src/views/widgets/OrganisatiesWidget.vue create mode 100644 src/views/widgets/PersonenWidget.vue diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index d7857d7..dfe6f4f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -10,6 +10,8 @@ use OCA\ZaakAfhandelApp\Dashboard\TakenWidget; use OCA\ZaakAfhandelApp\Dashboard\OpenZakenWidget; use OCA\ZaakAfhandelApp\Dashboard\ContactmomentenWidget; +use OCA\ZaakAfhandelApp\Dashboard\PersonenWidget; +use OCA\ZaakAfhandelApp\Dashboard\OrganisatiesWidget; /** * Class Application @@ -36,6 +38,8 @@ public function register(IRegistrationContext $context): void $context->registerDashboardWidget(TakenWidget::class); $context->registerDashboardWidget(OpenZakenWidget::class); $context->registerDashboardWidget(ContactmomentenWidget::class); + $context->registerDashboardWidget(PersonenWidget::class); + $context->registerDashboardWidget(OrganisatiesWidget::class); } public function boot(IBootContext $context): void diff --git a/lib/Dashboard/OrganisatiesWidget.php b/lib/Dashboard/OrganisatiesWidget.php new file mode 100644 index 0000000..4ca9e72 --- /dev/null +++ b/lib/Dashboard/OrganisatiesWidget.php @@ -0,0 +1,69 @@ +l10n->t('Organisaties zoeken'); + } + + /** + * @inheritDoc + */ + public function getOrder(): int + { + return 10; + } + + /** + * @inheritDoc + */ + public function getIconClass(): string + { + return 'icon-zaken-widget'; + } + + /** + * @inheritDoc + */ + public function getUrl(): ?string + { + return null; + } + + /** + * @inheritDoc + */ + public function load(): void + { + Util::addScript(Application::APP_ID, Application::APP_ID . '-organisatiesWidget'); + Util::addStyle(Application::APP_ID, 'dashboardWidgets'); + } +} diff --git a/lib/Dashboard/PersonenWidget.php b/lib/Dashboard/PersonenWidget.php new file mode 100644 index 0000000..2b9ffcb --- /dev/null +++ b/lib/Dashboard/PersonenWidget.php @@ -0,0 +1,69 @@ +l10n->t('Personen zoeken'); + } + + /** + * @inheritDoc + */ + public function getOrder(): int + { + return 10; + } + + /** + * @inheritDoc + */ + public function getIconClass(): string + { + return 'icon-zaken-widget'; + } + + /** + * @inheritDoc + */ + public function getUrl(): ?string + { + return null; + } + + /** + * @inheritDoc + */ + public function load(): void + { + Util::addScript(Application::APP_ID, Application::APP_ID . '-personenWidget'); + Util::addStyle(Application::APP_ID, 'dashboardWidgets'); + } +} diff --git a/package-lock.json b/package-lock.json index b0938d8..6159537 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@nextcloud/router": "^2.0.1", "@nextcloud/vue": "^8.12.0", "bootstrap-vue": "^2.23.1", + "lodash": "^4.17.21", "pinia": "^2.2.4", "vue": "^2.7.14", "vue-loading-overlay": "^3.4.3", @@ -15261,7 +15262,6 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, "license": "MIT" }, "node_modules/lodash.debounce": { diff --git a/package.json b/package.json index ce027b2..88ee6e6 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@nextcloud/router": "^2.0.1", "@nextcloud/vue": "^8.12.0", "bootstrap-vue": "^2.23.1", + "lodash": "^4.17.21", "pinia": "^2.2.4", "vue": "^2.7.14", "vue-loading-overlay": "^3.4.3", @@ -53,4 +54,4 @@ "typescript": "^5.5.4", "vue-jest": "^3.0.7" } -} \ No newline at end of file +} diff --git a/src/entities/klanten/klanten.mock.ts b/src/entities/klanten/klanten.mock.ts index f9fffe7..b48e1eb 100644 --- a/src/entities/klanten/klanten.mock.ts +++ b/src/entities/klanten/klanten.mock.ts @@ -4,6 +4,7 @@ import { TKlant } from './klanten.types' export const mockKlantData = (): TKlant[] => [ { id: '15551d6f-44e3-43f3-a9d2-59e583c91eb0', + type: 'persoon', voornaam: 'John', tussenvoegsel: 'de', achternaam: 'Doe', diff --git a/src/entities/klanten/klanten.ts b/src/entities/klanten/klanten.ts index cbc95ad..ef71d14 100644 --- a/src/entities/klanten/klanten.ts +++ b/src/entities/klanten/klanten.ts @@ -1,9 +1,10 @@ import { SafeParseReturnType, z } from 'zod' -import { TKlant } from './klanten.types' +import { TKlant, TKlantType } from './klanten.types' export class Klant implements TKlant { public id: string + public type: TKlantType public voornaam: string public tussenvoegsel: string public achternaam: string @@ -22,6 +23,7 @@ export class Klant implements TKlant { constructor(source: TKlant) { this.id = source.id || '' + this.type = source.type || 'persoon' this.voornaam = source.voornaam || '' this.tussenvoegsel = source.tussenvoegsel || '' this.achternaam = source.achternaam || '' diff --git a/src/entities/klanten/klanten.types.ts b/src/entities/klanten/klanten.types.ts index 68b00ce..5f21bac 100644 --- a/src/entities/klanten/klanten.types.ts +++ b/src/entities/klanten/klanten.types.ts @@ -1,5 +1,8 @@ +export type TKlantType = 'persoon' | 'organisatie' + export type TKlant = { id: string; + type: TKlantType; voornaam: string; tussenvoegsel: string; achternaam: string; diff --git a/src/modals/klanten/EditKlant.vue b/src/modals/klanten/EditKlant.vue index 8be256a..e7c2cdd 100644 --- a/src/modals/klanten/EditKlant.vue +++ b/src/modals/klanten/EditKlant.vue @@ -15,6 +15,13 @@ import { klantStore, navigationStore } from '../../store/store.js'
+ +