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/dialogs/Dialogs.vue b/src/dialogs/Dialogs.vue index 9650d92..85d1b84 100644 --- a/src/dialogs/Dialogs.vue +++ b/src/dialogs/Dialogs.vue @@ -1,8 +1,6 @@ - diff --git a/src/views/widgets/OpenZakenWidget.vue b/src/views/widgets/OpenZakenWidget.vue index 60b2430..a9ba93b 100644 --- a/src/views/widgets/OpenZakenWidget.vue +++ b/src/views/widgets/OpenZakenWidget.vue @@ -9,7 +9,7 @@ import { zaakStore } from '../../store/store.js' :loading="loading" @show="onShow">