From 74870b38b91dc8a1d523590d5c0509e940ddf64f Mon Sep 17 00:00:00 2001 From: StephanStrehlerCGI <115698474+StephanStrehlerCGI@users.noreply.github.com> Date: Fri, 9 Feb 2024 11:41:13 +0100 Subject: [PATCH] #881 move types folder (#1288) * #881 move types folder * #881 update types in package.json --- .../components/digiwf-dms-input/package.json | 4 ++-- .../src/apiClient/dmsApiCalls.ts | 6 +++--- .../src/components/DwfDmsInput.vue | 4 ++-- .../src/components/DwfObjectPreview.vue | 2 -- .../src/middleware/dmsMiddleware.ts | 9 +++++++- .../digiwf-dms-input/src/types/index.ts | 21 ------------------- .../digiwf-dms-input/types/index.d.ts | 4 ++++ 7 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 digiwf-apps/packages/components/digiwf-dms-input/src/types/index.ts create mode 100644 digiwf-apps/packages/components/digiwf-dms-input/types/index.d.ts diff --git a/digiwf-apps/packages/components/digiwf-dms-input/package.json b/digiwf-apps/packages/components/digiwf-dms-input/package.json index fe730a1c63..27ee79b350 100644 --- a/digiwf-apps/packages/components/digiwf-dms-input/package.json +++ b/digiwf-apps/packages/components/digiwf-dms-input/package.json @@ -21,11 +21,11 @@ "files": [ "dist/*", "src/*", - "src/types/*" + "types/*" ], "publishConfig": { "access": "public" }, - "types": "src/types/index.ts", + "types": "types/index.d.ts", "gitHead": "47fcec12b321f6890de7729c98cd5f0ed7b1189d" } diff --git a/digiwf-apps/packages/components/digiwf-dms-input/src/apiClient/dmsApiCalls.ts b/digiwf-apps/packages/components/digiwf-dms-input/src/apiClient/dmsApiCalls.ts index 4e2fa01d2c..25414ab659 100644 --- a/digiwf-apps/packages/components/digiwf-dms-input/src/apiClient/dmsApiCalls.ts +++ b/digiwf-apps/packages/components/digiwf-dms-input/src/apiClient/dmsApiCalls.ts @@ -1,6 +1,6 @@ -import {Configuration, MetadataApiFactory, Metadata} from "@muenchen/digiwf-dms-api-internal"; +import {Configuration, Metadata, MetadataApiFactory} from "@muenchen/digiwf-dms-api-internal"; +import {Objectclass} from "@/middleware/dmsMiddleware"; import {AxiosResponse} from "axios"; -import {Objectclass} from "@/types"; /** * Calls readMetadata on dms api @@ -11,6 +11,6 @@ import {Objectclass} from "@/types"; export const getMetadataFromDmsservice = (ojectclass: Objectclass, coo: string, cfg: Configuration): Promise => { return MetadataApiFactory(cfg) .readMetadata(ojectclass,coo) - .then((response: AxiosResponse) => Promise.resolve(response.data)); + .then((response: AxiosResponse) => Promise.resolve(response.data)); } diff --git a/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfDmsInput.vue b/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfDmsInput.vue index 8770485450..3b1164fa01 100644 --- a/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfDmsInput.vue +++ b/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfDmsInput.vue @@ -77,8 +77,8 @@ import {defineComponent, inject, onMounted, ref} from "vue"; -import {getMetadata} from "@/middleware/dmsMiddleware"; -import {Metadata, Objectclass} from "@/types"; +import {getMetadata, Objectclass} from "@/middleware/dmsMiddleware"; +import {Metadata} from "@muenchen/digiwf-dms-api-internal"; interface DmsObject { readonly coo: string; diff --git a/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfObjectPreview.vue b/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfObjectPreview.vue index 9d241e88a9..3d2a168d0e 100644 --- a/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfObjectPreview.vue +++ b/digiwf-apps/packages/components/digiwf-dms-input/src/components/DwfObjectPreview.vue @@ -35,8 +35,6 @@ export default defineComponent({ props: ['coo','metadata','errormessage','readOnly'], emits: ['remove-object'], setup(props, {emit}) { - - console.log(props); const calculateIcon = (type: string) => { if (type === "PDF-Dokument") { return "mdi-file-pdf"; diff --git a/digiwf-apps/packages/components/digiwf-dms-input/src/middleware/dmsMiddleware.ts b/digiwf-apps/packages/components/digiwf-dms-input/src/middleware/dmsMiddleware.ts index ad6c9f0169..6e06979aa7 100644 --- a/digiwf-apps/packages/components/digiwf-dms-input/src/middleware/dmsMiddleware.ts +++ b/digiwf-apps/packages/components/digiwf-dms-input/src/middleware/dmsMiddleware.ts @@ -1,9 +1,16 @@ import { Configuration, FetchUtils, Metadata } from "@muenchen/digiwf-dms-api-internal"; -import {Objectclass} from "@/types"; import { getMetadataFromDmsservice } from "@/apiClient/dmsApiCalls"; +export enum Objectclass { + Sachakte ="Sachakte", + Vorgang = "Vorgang", + Eingang = "Eingang", + Ausgang = "Ausgang", + Intern = "Intern", + Schriftstueck = "Schriftstueck", +} export const getMetadata = async (ojectclass: Objectclass, coo: string, apiEndpoint: string): Promise => { const dmsAxiosConfig = axiosConfig(apiEndpoint); diff --git a/digiwf-apps/packages/components/digiwf-dms-input/src/types/index.ts b/digiwf-apps/packages/components/digiwf-dms-input/src/types/index.ts deleted file mode 100644 index 6b8eea4e16..0000000000 --- a/digiwf-apps/packages/components/digiwf-dms-input/src/types/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Vue from "vue"; - -export class DwfDmsInput extends Vue { -} - -export interface Metadata { - name: string; - type: string | undefined; - url: string; -} - -export enum Objectclass { - Sachakte ="Sachakte", - Vorgang = "Vorgang", - Eingang = "Eingang", - Ausgang = "Ausgang", - Intern = "Intern", - Schriftstueck = "Schriftstueck", -} - - diff --git a/digiwf-apps/packages/components/digiwf-dms-input/types/index.d.ts b/digiwf-apps/packages/components/digiwf-dms-input/types/index.d.ts new file mode 100644 index 0000000000..57645cc34f --- /dev/null +++ b/digiwf-apps/packages/components/digiwf-dms-input/types/index.d.ts @@ -0,0 +1,4 @@ +import Vue from "vue"; + +export class DwfDmsInput extends Vue { +}