diff --git a/components/ConfigurationsTreeView.vue b/components/ConfigurationsTreeView.vue index 9193d64a0a1f52acddf240299aa2ec4ee93d1e40..a63a2eba19aebda2e6ea428d8b7c8f58cb67bcc2 100644 --- a/components/ConfigurationsTreeView.vue +++ b/components/ConfigurationsTreeView.vue @@ -107,7 +107,7 @@ export default class ConfigurationsTreeView extends Vue { * * @fires ConfigurationsTreeView#select */ - set selectedNodeSingletonList (nodesArray:ConfigurationsTreeNode[]) { + set selectedNodeSingletonList (nodesArray: ConfigurationsTreeNode[]) { const node: ConfigurationsTreeNode | null = nodesArray[0] ?? null this.$emit('input', node) } diff --git a/components/PlatformBasicData.vue b/components/PlatformBasicData.vue index dcbd9664bb8157c0604656676df501ee5f27fb46..9aacf7e3cedada1c01a2cd008fc9fc772678b700 100644 --- a/components/PlatformBasicData.vue +++ b/components/PlatformBasicData.vue @@ -116,7 +116,6 @@ import { Status } from '@/models/Status' import { Manufacturer } from '@/models/Manufacturer' import { createPlatformUrn } from '@/modelUtils/urnBuilders' -import { DeviceType } from '@/models/DeviceType' @Component({ computed: { @@ -136,13 +135,13 @@ export default class PlatformBasicData extends Vue { readonly value!: Platform // vuex definition for typescript check - loadEquipmentstatus!: ()=> void; - loadPlatformtypes!: ()=> void; - loadManufacturers!: ()=> void; - getManufacturerByUri!: (uri: string)=> Manufacturer | undefined; - getPlatformTypeByUri!: (uri: string)=> PlatformType | undefined; - getEquipmentstatusByUri!: (uri: string)=> Status | undefined; - platformtypes!:[] + loadEquipmentstatus!: () => void + loadPlatformtypes!: () => void + loadManufacturers!: () => void + getManufacturerByUri!: (uri: string) => Manufacturer | undefined + getPlatformTypeByUri!: (uri: string) => PlatformType | undefined + getEquipmentstatusByUri!: (uri: string) => Status | undefined + platformtypes!: [] async mounted () { try { diff --git a/components/configurations/ConfigurationsBasicDataForm.vue b/components/configurations/ConfigurationsBasicDataForm.vue index be6aab115c9109b69b9d1978bde6478f4eda2f0a..6d07e423d8fe68dc451c01a8deceb83a50009f03 100644 --- a/components/configurations/ConfigurationsBasicDataForm.vue +++ b/components/configurations/ConfigurationsBasicDataForm.vue @@ -124,8 +124,8 @@ export default class ConfigurationsBasicDataForm extends Vue { readonly LOCATION_TYPE_DYNAMIC = 'Dynamic' // vuex definition for typescript check - loadConfigurationsStates!: ()=> void; - loadProjects!: ()=> void; + loadConfigurationsStates!: () => void + loadProjects!: () => void async created () { await this.loadConfigurationsStates() diff --git a/components/devices/DevicesListItem.vue b/components/devices/DevicesListItem.vue index 47d38adc09f78eff35f5145f203f4c4eccf677df..45c73503206514d360dfb28eaace72f2506375a4 100644 --- a/components/devices/DevicesListItem.vue +++ b/components/devices/DevicesListItem.vue @@ -252,8 +252,8 @@ export default class DevicesListItem extends Vue { public readonly NO_TYPE: string = 'Unknown type' // vuex definition for typescript check - getDeviceTypeByUri!: (uri: string)=> DeviceType | undefined; - getEquipmentstatusByUri!: (uri: string)=> Status | undefined; + getDeviceTypeByUri!: (uri: string) => DeviceType | undefined + getEquipmentstatusByUri!: (uri: string) => Status | undefined getTextOrDefault = (text: string): string => text || '-' diff --git a/components/platforms/PlatformsListItem.vue b/components/platforms/PlatformsListItem.vue index f7a7a547f46581e1e7ce2599b5e61e6ff158694c..bd7af9ec4f8c304bbed6bb006928ab171a93f629 100644 --- a/components/platforms/PlatformsListItem.vue +++ b/components/platforms/PlatformsListItem.vue @@ -252,8 +252,8 @@ export default class PlatformsListItem extends Vue { private show = false // vuex definition for typescript check - getPlatformTypeByUri!: (uri: string)=> PlatformType | undefined; - getEquipmentstatusByUri!: (uri: string)=> Status | undefined; + getPlatformTypeByUri!: (uri: string) => PlatformType | undefined + getEquipmentstatusByUri!: (uri: string) => Status | undefined getTextOrDefault = (text: string): string => text || '-' diff --git a/models/views/devices/actions/DeviceMountAction.ts b/models/views/devices/actions/DeviceMountAction.ts index 50c986157408631ef46b5b9b563316fb515e58bb..51711c6aa7cc6b27aeb6d445745ec5d426fb15e9 100644 --- a/models/views/devices/actions/DeviceMountAction.ts +++ b/models/views/devices/actions/DeviceMountAction.ts @@ -76,7 +76,7 @@ export class DeviceMountAction implements IDeviceMountAction, IDateCompareable { return this._parentPlatform } - get date(){ + get date () { return this._basicData.date } diff --git a/models/views/devices/actions/DeviceUnmountAction.ts b/models/views/devices/actions/DeviceUnmountAction.ts index 31bd6b8127836422d73ce3b3b5fbfa17f1d9361d..19c57e772fe81f945bdeea36947f305f17c21e9c 100644 --- a/models/views/devices/actions/DeviceUnmountAction.ts +++ b/models/views/devices/actions/DeviceUnmountAction.ts @@ -67,7 +67,7 @@ export class DeviceUnmountAction implements IDeviceUnmountAction, IDateCompareab return this._contact } - get date(){ + get date () { return this._basicData.date } diff --git a/pages/configurations/_configurationId.vue b/pages/configurations/_configurationId.vue index 69f478f05c0b584619cbd31f383474ef9de12f7b..ca240e1d7b333720b72f5b0e8650b2aee08da8ca 100644 --- a/pages/configurations/_configurationId.vue +++ b/pages/configurations/_configurationId.vue @@ -59,9 +59,9 @@ export default class ConfigurationsIdPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initConfigurationsConfigurationIdAppBar!: (id:string)=>void - setDefaults!:()=>void - loadConfiguration!:(id:string)=>void + initConfigurationsConfigurationIdAppBar!: (id: string) => void + setDefaults!: () => void + loadConfiguration!: (id: string) => void async created () { try { diff --git a/pages/configurations/_configurationId/basic/edit.vue b/pages/configurations/_configurationId/basic/edit.vue index eb07aa23504e7d9347b72d6c892a60fe791195b1..59544139a143014d400f1ee734d85da48538520c 100644 --- a/pages/configurations/_configurationId/basic/edit.vue +++ b/pages/configurations/_configurationId/basic/edit.vue @@ -86,9 +86,9 @@ export default class ConfigurationEditBasicPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - configuration!:IConfiguration - saveConfiguration!:(configuration: Configuration)=>void - loadConfiguration!:(id:string)=>void + configuration!: IConfiguration + saveConfiguration!: (configuration: Configuration) => void + loadConfiguration!: (id: string) => void created () { this.configurationCopy = Configuration.createFromObject(this.configuration) diff --git a/pages/configurations/_configurationId/basic/index.vue b/pages/configurations/_configurationId/basic/index.vue index 256e5af836d4392a51bffc5ae5dc247d10bf2402..c876149377f859dd3313b686b70c914184ebb4ac 100644 --- a/pages/configurations/_configurationId/basic/index.vue +++ b/pages/configurations/_configurationId/basic/index.vue @@ -120,8 +120,8 @@ export default class ConfigurationShowBasicPage extends Vue { private showDeleteDialog: boolean = false // vuex definition for typescript check - configuration!:IConfiguration - deleteConfiguration!:(id: string)=>void + configuration!: IConfiguration + deleteConfiguration!: (id: string) => void get configurationId () { return this.$route.params.configurationId diff --git a/pages/configurations/_configurationId/contacts.vue b/pages/configurations/_configurationId/contacts.vue index d6c581692b5cb8bd87a8743bcd62a5f7dd2305a3..0dc97045e834337cc32f6e088f28d7d0dba766fd 100644 --- a/pages/configurations/_configurationId/contacts.vue +++ b/pages/configurations/_configurationId/contacts.vue @@ -55,7 +55,7 @@ export default class ContactTab extends Vue { private isLoading = false // vuex definition for typescript check - loadConfigurationContacts!:(id:string)=>void + loadConfigurationContacts!: (id: string) => void created () { try { diff --git a/pages/configurations/_configurationId/contacts/index.vue b/pages/configurations/_configurationId/contacts/index.vue index 3402e4c73d2e1a246dc992daeaa6b91b32df5cea..16ea728535f8405d9647cd63ceec3c81cd796b7e 100644 --- a/pages/configurations/_configurationId/contacts/index.vue +++ b/pages/configurations/_configurationId/contacts/index.vue @@ -101,11 +101,11 @@ export default class ConfigurationShowContactPage extends Vue { private isSaving = false // vuex definition for typescript check - loadConfigurationContacts!:(id:string)=>void - removeConfigurationContact!:({ + loadConfigurationContacts!: (id: string) => void + removeConfigurationContact!: ({ configurationId, contactId - }: { configurationId: string, contactId: string })=>void + }: { configurationId: string, contactId: string }) => void get configurationId (): string { return this.$route.params.configurationId diff --git a/pages/configurations/_configurationId/contacts/new.vue b/pages/configurations/_configurationId/contacts/new.vue index 4c5b8bf9cf329e3a63a6de0ac778e6b44826514d..14e5adbeef129516e3bca9d75ed9840daa2b2fdf 100644 --- a/pages/configurations/_configurationId/contacts/new.vue +++ b/pages/configurations/_configurationId/contacts/new.vue @@ -103,9 +103,9 @@ export default class ConfigurationAddContactPage extends Vue { private isSaving: boolean = false // vuex definition for typescript check - loadConfigurationContacts!:(id:string)=>void - loadAllContacts!:()=>void - contactsByDifference!:(contactsToSubtract: Contact[])=>Contact[] + loadConfigurationContacts!: (id: string) => void + loadAllContacts!: () => void + contactsByDifference!: (contactsToSubtract: Contact[]) => Contact[] configurationContacts!: [] addConfigurationContact!: ({ configurationId, diff --git a/pages/configurations/_configurationId/platforms-and-devices/index.vue b/pages/configurations/_configurationId/platforms-and-devices/index.vue index ac75a3d952dbdc63f6d247922e5bdfbee4df0e4e..d05e8e86028b59214de1d32c85b3c9e0b6e3238e 100644 --- a/pages/configurations/_configurationId/platforms-and-devices/index.vue +++ b/pages/configurations/_configurationId/platforms-and-devices/index.vue @@ -126,7 +126,7 @@ export default class ConfigurationShowPlatformsAndDevicesPage extends Vue { private selectedDate = DateTime.utc() // vuex definition for typescript check - configuration!:Configuration + configuration!: Configuration get configurationId (): string { return this.$route.params.configurationId diff --git a/pages/configurations/_configurationId/platforms-and-devices/mount.vue b/pages/configurations/_configurationId/platforms-and-devices/mount.vue index d41e2f31bfda3a675e2a3cdb96a6616f66ca8f9b..c73fead0290c0c32e9db053967afb7983c1acda6 100644 --- a/pages/configurations/_configurationId/platforms-and-devices/mount.vue +++ b/pages/configurations/_configurationId/platforms-and-devices/mount.vue @@ -379,8 +379,6 @@ import HintCard from '@/components/HintCard.vue' import { dateToDateTimeStringHHMM } from '@/utils/dateHelper' import ProgressIndicator from '@/components/ProgressIndicator.vue' import { Configuration } from '@/models/Configuration' -import { IDeviceSearchParams } from '@/modelUtils/DeviceSearchParams' -import { IPlatformSearchParams } from '@/modelUtils/PlatformSearchParams' @Component({ components: { ProgressIndicator, HintCard, PlatformMountListItem, ConfigurationsPlatformDeviceMountForm, DevicesMountListItem, DevicesListItem, BaseList, DateTimePicker, ConfigurationsTreeView }, @@ -412,23 +410,25 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { private selectedType: string|null = null private selectedNode: ConfigurationsTreeNode | null = null private selectedDate = DateTime.utc() - private platformToMount: {platform:Platform,mountInfo:{}}|null = null - private deviceToMount: {device:Device,mountInfo:{}}|null = null + private platformToMount: {platform: Platform, mountInfo: {}}|null = null + private deviceToMount: {device: Device, mountInfo: {}}|null = null // vuex definition for typescript check - loadAllContacts!:()=>void - configuration!:Configuration - searchDevices!:(searchText:string)=>void - searchPlatforms!:(searchText:string)=>void - addDeviceMountAction!:( { + loadAllContacts!: () => void + configuration!: Configuration + searchDevices!: (searchText: string) => void + searchPlatforms!: (searchText: string) => void + addDeviceMountAction!: ({ configurationId, deviceMountAction - }: { configurationId: string, deviceMountAction: DeviceMountAction })=>Promise<void> - addPlatformMountAction!:( { + }: { configurationId: string, deviceMountAction: DeviceMountAction }) => Promise<void> + + addPlatformMountAction!: ({ configurationId, platformMountAction - }: { configurationId: string, platformMountAction: PlatformMountAction })=>Promise<void> - loadConfiguration!: (id: string)=>void + }: { configurationId: string, platformMountAction: PlatformMountAction }) => Promise<void> + + loadConfiguration!: (id: string) => void async created () { try { @@ -479,7 +479,7 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { async searchDevicesForMount () { try { this.isLoading = true - await this.searchDevices(this.searchTextDevices ) + await this.searchDevices(this.searchTextDevices) } catch (e) { this.$store.commit('snackbar/setError', 'Loading of devices failed') } finally { @@ -507,7 +507,7 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { } } - mountDevice (device:Device, mountInfo:any) { + mountDevice (device: Device, mountInfo: any) { try { if (this.selectedNode && !this.selectedNode.canHaveChildren()) { this.$store.commit('snackbar/setError', 'Selected node-type cannot have children') @@ -548,7 +548,7 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { } } - async mountPlatform (platform:Platform, mountInfo:any) { + async mountPlatform (platform: Platform, mountInfo: any) { try { if (this.selectedNode && !this.selectedNode.canHaveChildren()) { this.$store.commit('snackbar/setError', 'Selected node-type cannot have children') @@ -589,7 +589,7 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { } } - setPlatformToMount (platform:Platform, mountInfo: any) { + setPlatformToMount (platform: Platform, mountInfo: any) { this.deviceToMount = null this.platformToMount = { platform, @@ -598,7 +598,7 @@ export default class ConfigurationMountPlatformsAndDevicesPage extends Vue { this.$store.commit('snackbar/setSuccess', 'Selected platform confirmed') } - setDeviceToMount (device:Device, mountInfo:any) { + setDeviceToMount (device: Device, mountInfo: any) { this.platformToMount = null this.deviceToMount = { diff --git a/pages/configurations/_configurationId/platforms-and-devices/unmount.vue b/pages/configurations/_configurationId/platforms-and-devices/unmount.vue index dbf9ad000d57d9e679efeb6bb8b716e1019094b4..85b51327e66d1d0ba817a9bf3be31c66d676c86a 100644 --- a/pages/configurations/_configurationId/platforms-and-devices/unmount.vue +++ b/pages/configurations/_configurationId/platforms-and-devices/unmount.vue @@ -142,17 +142,19 @@ export default class ConfigurationUnMountPlatformsAndDevicesPage extends Vue { private isLoading = false // vuex definition for typescript check - loadAllContacts!:()=>void - configuration!:Configuration - addDeviceUnMountAction!:({ + loadAllContacts!: () => void + configuration!: Configuration + addDeviceUnMountAction!: ({ configurationId, deviceUnMountAction - }: { configurationId: string, deviceUnMountAction: DeviceUnmountAction })=>Promise<string> - addPlatformUnMountAction!:({ - configurationId, - platformUnMountAction - }: { configurationId: string, platformUnMountAction: PlatformUnmountAction })=>Promise<string> - loadConfiguration!:(id:string)=>void + }: { configurationId: string, deviceUnMountAction: DeviceUnmountAction }) => Promise<string> + + addPlatformUnMountAction!: ({ + configurationId, + platformUnMountAction + }: { configurationId: string, platformUnMountAction: PlatformUnmountAction }) => Promise<string> + + loadConfiguration!: (id: string) => void async created () { try { @@ -192,7 +194,7 @@ export default class ConfigurationUnMountPlatformsAndDevicesPage extends Vue { return null } - unmount ({ contact, description }:{contact:Contact,description:string}) { + unmount ({ contact, description }: {contact: Contact, description: string}) { if (!this.selectedNode || !this.selectedDate) { return } @@ -201,7 +203,6 @@ export default class ConfigurationUnMountPlatformsAndDevicesPage extends Vue { this.unmountDevice((this.selectedNode as DeviceNode).unpack().device, contact, description) } if (this.selectedNode.isPlatform()) { - (this.selectedNode as PlatformNode).unpack().platform this.unmountPlatform((this.selectedNode as PlatformNode).unpack().platform, contact, description) } } diff --git a/pages/configurations/index.vue b/pages/configurations/index.vue index a332b4bb096e86559f6352c52a71d08062664d8a..c8778f4cfd7b7b204add217ba8e60f72b7948597 100644 --- a/pages/configurations/index.vue +++ b/pages/configurations/index.vue @@ -242,16 +242,16 @@ export default class SearchConfigurationsPage extends Vue { private configurationToDelete: Configuration | null = null // vuex definition for typescript check - initConfigurationsIndexAppBar!:()=>void - setDefaults!:()=>void - loadConfigurationsStates!:()=>void - pageNumber!:number - setPageNumber!:(newPageNumber: number)=>void - searchConfigurationsPaginated!:(searchParams: IConfigurationSearchParams)=>void - configurations!:Configuration[] - deleteConfiguration!:(id:string)=>void - configurationStates!:string[] - projects!:Project[] + initConfigurationsIndexAppBar!: () => void + setDefaults!: () => void + loadConfigurationsStates!: () => void + pageNumber!: number + setPageNumber!: (newPageNumber: number) => void + searchConfigurationsPaginated!: (searchParams: IConfigurationSearchParams) => void + configurations!: Configuration[] + deleteConfiguration!: (id: string) => void + configurationStates!: string[] + projects!: Project[] async created () { try { @@ -309,8 +309,8 @@ export default class SearchConfigurationsPage extends Vue { } basicSearch () { - this.selectedConfigurationStates=[] - this.selectedProjects=[] + this.selectedConfigurationStates = [] + this.selectedProjects = [] this.page = 1// Important to set page to one otherwise it's possible that you don't anything this.runSearch() } @@ -320,7 +320,7 @@ export default class SearchConfigurationsPage extends Vue { this.initUrlQueryParams() } - extendedSearch (){ + extendedSearch () { this.page = 1// Important to set page to one otherwise it's possible that you don't anything this.runSearch() } diff --git a/pages/configurations/new.vue b/pages/configurations/new.vue index 32f470999b8711e8b4bb1efbf5ac85b953d0993f..163316410c1af8a0b1d93090afa57bb109adb05d 100644 --- a/pages/configurations/new.vue +++ b/pages/configurations/new.vue @@ -89,9 +89,9 @@ export default class ConfigurationNewPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initConfigurationsNewAppBar!: ()=>void - setDefaults!:()=>void - saveConfiguration!:(configuration: Configuration)=>Promise<Configuration> + initConfigurationsNewAppBar!: () => void + setDefaults!: () => void + saveConfiguration!: (configuration: Configuration) => Promise<Configuration> created () { this.initConfigurationsNewAppBar() diff --git a/pages/contacts/_contactId.vue b/pages/contacts/_contactId.vue index e615541f98eb344e2f1038275467371c48c006a9..423c83d6f641c5959ffa15b0aa3bf4e434d36ecd 100644 --- a/pages/contacts/_contactId.vue +++ b/pages/contacts/_contactId.vue @@ -53,9 +53,9 @@ export default class ContactShowPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initContactsContactIdAppBar!: ()=>void - setDefaults!:()=>void - loadContact!:(id:string)=>void + initContactsContactIdAppBar!: () => void + setDefaults!: () => void + loadContact!: (id: string) => void async created () { try { diff --git a/pages/contacts/_contactId/edit.vue b/pages/contacts/_contactId/edit.vue index 3ea7c18e770df56d63753bab1600c663bf89eb4c..e244ab4450f11d8ab7ecbd8dc0ae6f50be0423e2 100644 --- a/pages/contacts/_contactId/edit.vue +++ b/pages/contacts/_contactId/edit.vue @@ -87,10 +87,10 @@ export default class ContactEditPage extends Vue { private contactCopy: Contact = new Contact() // vuex definition for typescript check - initContactsContactIdEditAppBar!: (title: string)=>void - contact!:Contact - saveContact!:(contact: Contact)=> Promise<Contact> - loadContact!:(id:string)=>void + initContactsContactIdEditAppBar!: (title: string) => void + contact!: Contact + saveContact!: (contact: Contact) => Promise<Contact> + loadContact!: (id: string) => void created () { this.initContactsContactIdEditAppBar(this.contact.toString()) diff --git a/pages/contacts/_contactId/index.vue b/pages/contacts/_contactId/index.vue index 6dcdc5974a330752499bd8680287de30f39cad15..11ae3b4657a013de5aa95e96dec247957ed5f355 100644 --- a/pages/contacts/_contactId/index.vue +++ b/pages/contacts/_contactId/index.vue @@ -110,9 +110,9 @@ export default class ContactIndexPage extends Vue { showDeleteDialog = false // vuex definition for typescript check - initContactsContactIdIndexAppBar!:(title:string)=>void - contact!:Contact - deleteContact!:(id:string)=>void + initContactsContactIdIndexAppBar!: (title: string) => void + contact!: Contact + deleteContact!: (id: string) => void created () { this.initContactsContactIdIndexAppBar(this.contact.toString()) diff --git a/pages/contacts/index.vue b/pages/contacts/index.vue index e769f396f5a3490dd2d5a6d35163f2491ed9767c..5e6e16f5d59ca82e2c13c809f70d931af390b5f6 100644 --- a/pages/contacts/index.vue +++ b/pages/contacts/index.vue @@ -175,12 +175,12 @@ export default class SearchContactsPage extends Vue { private contactToDelete: Contact | null = null // vuex definition for typescript check - initContactsIndexAppBar!: ()=>void - setDefaults!:()=>void - pageNumber!:number - setPageNumber!:(newPageNumber: number)=>void - searchContactsPaginated!:(searchtext: string)=>void - deleteContact!:(id:string)=>void + initContactsIndexAppBar!: () => void + setDefaults!: () => void + pageNumber!: number + setPageNumber!: (newPageNumber: number) => void + searchContactsPaginated!: (searchtext: string) => void + deleteContact!: (id: string) => void async created () { try { @@ -289,10 +289,10 @@ export default class SearchContactsPage extends Vue { } initUrlQueryParams (): void { - const params:{[key: string]: string} = {} + const params: {[key: string]: string} = {} if (this.searchText) { - params.searchText= this.searchText + params.searchText = this.searchText } this.$router.push({ query: params, diff --git a/pages/contacts/new.vue b/pages/contacts/new.vue index 86a8020a2497e545116e5a7f989b6f8a702427fc..ca63e7bd32b822832264a480f685de04990cdc1c 100644 --- a/pages/contacts/new.vue +++ b/pages/contacts/new.vue @@ -90,9 +90,9 @@ export default class ContactNewPage extends mixins(Rules) { private isLoading: boolean = false // vuex definition for typescript check - initContactsNewAppBar!: ()=>void - setDefaults!:()=>void - saveContact!:(contact: Contact)=>Promise<Contact> + initContactsNewAppBar!: () => void + setDefaults!: () => void + saveContact!: (contact: Contact) => Promise<Contact> created () { this.initContactsNewAppBar() diff --git a/pages/devices/_deviceId.vue b/pages/devices/_deviceId.vue index 8f6dbb70f1220274a0662106a82df9aa03f1dd7c..ee5f68bf28485057507ccb10b813db689437a20e 100644 --- a/pages/devices/_deviceId.vue +++ b/pages/devices/_deviceId.vue @@ -58,16 +58,16 @@ export default class DevicePage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initDevicesDeviceIdAppBar!: (id:string)=>void - setDefaults!:()=>void - loadDevice!:({ + initDevicesDeviceIdAppBar!: (id: string) => void + setDefaults!: () => void + loadDevice!: ({ deviceId, includeContacts, includeCustomFields, includeDeviceProperties, includeDeviceAttachments }: - { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean })=>void + { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean }) => void async created () { try { diff --git a/pages/devices/_deviceId/actions.vue b/pages/devices/_deviceId/actions.vue index e10c09d4720fd32575ce40fe5bd90363ff9a4b1d..0777dff1f5352746a5ec37d32222f3431283984d 100644 --- a/pages/devices/_deviceId/actions.vue +++ b/pages/devices/_deviceId/actions.vue @@ -50,7 +50,7 @@ export default class DeviceActionsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadAllDeviceActions!: (id:string)=>void + loadAllDeviceActions!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/actions/device-calibration-actions/_actionId/edit.vue b/pages/devices/_deviceId/actions/device-calibration-actions/_actionId/edit.vue index 2fb8f36e5336d37f59c922dff6dd08933cd9d181..2abc36ebb0ac24938a2e7d7637f75f37175da40c 100644 --- a/pages/devices/_deviceId/actions/device-calibration-actions/_actionId/edit.vue +++ b/pages/devices/_deviceId/actions/device-calibration-actions/_actionId/edit.vue @@ -96,15 +96,16 @@ export default class DeviceCalibrationActionEditPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceCalibrationAction!: (id:string)=>void - loadDeviceAttachments!: (id:string)=>void - loadDeviceMeasuredQuantities!:(id:string)=>void - deviceCalibrationAction!:DeviceCalibrationAction - updateDeviceCalibrationAction!:({ + loadDeviceCalibrationAction!: (id: string) => void + loadDeviceAttachments!: (id: string) => void + loadDeviceMeasuredQuantities!: (id: string) => void + deviceCalibrationAction!: DeviceCalibrationAction + updateDeviceCalibrationAction!: ({ deviceId, calibrationDeviceAction - }: { deviceId: string, calibrationDeviceAction: DeviceCalibrationAction })=>Promise<DeviceCalibrationAction> - loadAllDeviceActions!:(id:string)=>void + }: { deviceId: string, calibrationDeviceAction: DeviceCalibrationAction }) => Promise<DeviceCalibrationAction> + + loadAllDeviceActions!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/actions/generic-device-actions/_actionId/edit.vue b/pages/devices/_deviceId/actions/generic-device-actions/_actionId/edit.vue index c83fb8526fe52651be7552c9dec107d3b1eb8945..6337659ef97bec5129c4c903de58781965519c1a 100644 --- a/pages/devices/_deviceId/actions/generic-device-actions/_actionId/edit.vue +++ b/pages/devices/_deviceId/actions/generic-device-actions/_actionId/edit.vue @@ -78,7 +78,6 @@ import ProgressIndicator from '@/components/ProgressIndicator.vue' import SaveAndCancelButtons from '@/components/configurations/SaveAndCancelButtons.vue' import { GenericAction } from '@/models/GenericAction' -import { DeviceCalibrationAction } from '@/models/DeviceCalibrationAction' @Component({ components: { @@ -97,14 +96,15 @@ export default class GenericDeviceActionEditPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceGenericAction!: (id:string)=>void - loadDeviceAttachments!: (id:string)=>void - deviceGenericAction!:GenericAction - updateDeviceGenericAction!:({ + loadDeviceGenericAction!: (id: string) => void + loadDeviceAttachments!: (id: string) => void + deviceGenericAction!: GenericAction + updateDeviceGenericAction!: ({ deviceId, genericDeviceAction - }: { deviceId: string, genericDeviceAction: GenericAction })=> Promise<GenericAction> - loadAllDeviceActions!:(id:string)=>void + }: { deviceId: string, genericDeviceAction: GenericAction }) => Promise<GenericAction> + + loadAllDeviceActions!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/actions/index.vue b/pages/devices/_deviceId/actions/index.vue index c3edff545b48760d00a2a63f88309fc4941f9a20..928d019f787c9d26f1bcea483ff73a3a84decd05 100644 --- a/pages/devices/_deviceId/actions/index.vue +++ b/pages/devices/_deviceId/actions/index.vue @@ -186,10 +186,10 @@ export default class DeviceActionsShowPage extends Vue { private showDeleteDialog: boolean = false // vuex definition for typescript check - deleteDeviceGenericAction!:(genericDeviceActionId: string)=>Promise<void> - loadAllDeviceActions!:(id:string)=>void - deleteDeviceSoftwareUpdateAction!:(softwareUpdateActionId: string)=>Promise<void> - deleteDeviceCalibrationAction!:(calibrationDeviceActionId: string)=>Promise<void> + deleteDeviceGenericAction!: (genericDeviceActionId: string) => Promise<void> + loadAllDeviceActions!: (id: string) => void + deleteDeviceSoftwareUpdateAction!: (softwareUpdateActionId: string) => Promise<void> + deleteDeviceCalibrationAction!: (calibrationDeviceActionId: string) => Promise<void> get deviceId (): string { return this.$route.params.deviceId @@ -258,7 +258,7 @@ export default class DeviceActionsShowPage extends Vue { } async deleteGenericAction () { - if(this.genericActionToDelete === null || this.genericActionToDelete.id ===null){ + if (this.genericActionToDelete === null || this.genericActionToDelete.id === null) { return } @@ -276,7 +276,7 @@ export default class DeviceActionsShowPage extends Vue { } async deleteSoftwareUpdateAction () { - if(this.softwareUpdateActionToDelete === null || this.softwareUpdateActionToDelete.id ===null){ + if (this.softwareUpdateActionToDelete === null || this.softwareUpdateActionToDelete.id === null) { return } try { @@ -293,7 +293,7 @@ export default class DeviceActionsShowPage extends Vue { } async deleteCalibrationAction () { - if(this.calibrationActionToDelete === null || this.calibrationActionToDelete.id ===null){ + if (this.calibrationActionToDelete === null || this.calibrationActionToDelete.id === null) { return } diff --git a/pages/devices/_deviceId/actions/new.vue b/pages/devices/_deviceId/actions/new.vue index 917c2d1316ca8a90941b334896b6943bedfc1688..23392e4feb2fdc69d043104cfb79e985817434e1 100644 --- a/pages/devices/_deviceId/actions/new.vue +++ b/pages/devices/_deviceId/actions/new.vue @@ -81,11 +81,11 @@ export default class ActionAddPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - loadDeviceGenericActionTypes!:()=>void - loadDeviceAttachments!: (id:string)=>void - loadDeviceMeasuredQuantities!:(id:string)=>void - chosenKindOfDeviceAction!:IOptionsForActionType | null - setChosenKindOfDeviceAction!:(newval: IOptionsForActionType | null)=>void + loadDeviceGenericActionTypes!: () => void + loadDeviceAttachments!: (id: string) => void + loadDeviceMeasuredQuantities!: (id: string) => void + chosenKindOfDeviceAction!: IOptionsForActionType | null + setChosenKindOfDeviceAction!: (newval: IOptionsForActionType | null) => void async created () { try { diff --git a/pages/devices/_deviceId/actions/new/device-calibration-actions.vue b/pages/devices/_deviceId/actions/new/device-calibration-actions.vue index e6d2511ca8e1265aa847640277607ab84684b208..ffe7a8b300a7ea71cf6040786843fc63fa7b2591 100644 --- a/pages/devices/_deviceId/actions/new/device-calibration-actions.vue +++ b/pages/devices/_deviceId/actions/new/device-calibration-actions.vue @@ -86,14 +86,13 @@ export default class NewDeviceCalibrationAction extends Vue { private isSaving: boolean = false // vuex definition for typescript check - addDeviceCalibrationAction!:({ + addDeviceCalibrationAction!: ({ deviceId, calibrationDeviceAction - }: { deviceId: string, calibrationDeviceAction: DeviceCalibrationAction })=>Promise<DeviceCalibrationAction> - loadAllDeviceActions!:(id:string)=>void - chosenKindOfDeviceAction!:IOptionsForActionType | null - + }: { deviceId: string, calibrationDeviceAction: DeviceCalibrationAction }) => Promise<DeviceCalibrationAction> + loadAllDeviceActions!: (id: string) => void + chosenKindOfDeviceAction!: IOptionsForActionType | null created () { if (this.chosenKindOfDeviceAction === null) { diff --git a/pages/devices/_deviceId/actions/new/generic-device-actions.vue b/pages/devices/_deviceId/actions/new/generic-device-actions.vue index 891cde4016c7f8cf47658181a28af1ec26b45c66..78dc67856ceef4ed908731d9474c8914e5421f41 100644 --- a/pages/devices/_deviceId/actions/new/generic-device-actions.vue +++ b/pages/devices/_deviceId/actions/new/generic-device-actions.vue @@ -69,7 +69,6 @@ import SaveAndCancelButtons from '@/components/configurations/SaveAndCancelButto import ProgressIndicator from '@/components/ProgressIndicator.vue' import { GenericAction } from '@/models/GenericAction' -import { DeviceCalibrationAction } from '@/models/DeviceCalibrationAction' import { IOptionsForActionType } from '@/store/devices' @Component({ middleware: ['auth'], @@ -82,13 +81,13 @@ export default class NewGenericDeviceAction extends Vue { private isSaving: boolean = false // vuex definition for typescript check - addDeviceGenericAction!:({ + addDeviceGenericAction!: ({ deviceId, genericDeviceAction - }: { deviceId: string, genericDeviceAction: GenericAction })=> Promise<GenericAction> - loadAllDeviceActions!:(id:string)=>void - chosenKindOfDeviceAction!:IOptionsForActionType | null + }: { deviceId: string, genericDeviceAction: GenericAction }) => Promise<GenericAction> + loadAllDeviceActions!: (id: string) => void + chosenKindOfDeviceAction!: IOptionsForActionType | null created () { if (this.chosenKindOfDeviceAction === null) { diff --git a/pages/devices/_deviceId/actions/new/software-update-actions.vue b/pages/devices/_deviceId/actions/new/software-update-actions.vue index d97c55db426a6e6c8d1cf856c1c51caa83adcc93..7e53a390d24797346bf9cefa3b059304258e52a3 100644 --- a/pages/devices/_deviceId/actions/new/software-update-actions.vue +++ b/pages/devices/_deviceId/actions/new/software-update-actions.vue @@ -81,12 +81,13 @@ export default class NewDeviceSoftwareUpdateActions extends Vue { private isSaving: boolean = false // vuex definition for typescript check - addDeviceSoftwareUpdateAction!:({ + addDeviceSoftwareUpdateAction!: ({ deviceId, softwareUpdateAction - }: { deviceId: string, softwareUpdateAction: SoftwareUpdateAction })=> Promise<SoftwareUpdateAction> - loadAllDeviceActions!:(id:string)=>void - chosenKindOfDeviceAction!:IOptionsForActionType | null + }: { deviceId: string, softwareUpdateAction: SoftwareUpdateAction }) => Promise<SoftwareUpdateAction> + + loadAllDeviceActions!: (id: string) => void + chosenKindOfDeviceAction!: IOptionsForActionType | null created () { if (this.chosenKindOfDeviceAction === null) { diff --git a/pages/devices/_deviceId/actions/software-update-actions/_actionId/edit.vue b/pages/devices/_deviceId/actions/software-update-actions/_actionId/edit.vue index cc6fb9cf374e52ec5cc06ba62840d6ca226f1434..5613904bace04e107cabe25f4d0b439ee9ab5fd8 100644 --- a/pages/devices/_deviceId/actions/software-update-actions/_actionId/edit.vue +++ b/pages/devices/_deviceId/actions/software-update-actions/_actionId/edit.vue @@ -93,14 +93,15 @@ export default class DeviceSoftwareUpdateActionEditPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceSoftwareUpdateAction!:(actionId: string)=>void - loadDeviceAttachments!:(id:string)=>void - deviceSoftwareUpdateAction!:SoftwareUpdateAction - updateDeviceSoftwareUpdateAction!:({ + loadDeviceSoftwareUpdateAction!: (actionId: string) => void + loadDeviceAttachments!: (id: string) => void + deviceSoftwareUpdateAction!: SoftwareUpdateAction + updateDeviceSoftwareUpdateAction!: ({ deviceId, softwareUpdateAction - }: { deviceId: string, softwareUpdateAction: SoftwareUpdateAction })=>Promise<SoftwareUpdateAction> - loadAllDeviceActions!:(id:string)=>void + }: { deviceId: string, softwareUpdateAction: SoftwareUpdateAction }) => Promise<SoftwareUpdateAction> + + loadAllDeviceActions!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/attachments.vue b/pages/devices/_deviceId/attachments.vue index 1d3469e76d8cd7f1ba31a0a20e541560e4075444..bdf18f86b76c254738b60b84e1c8d40a6ef543a5 100644 --- a/pages/devices/_deviceId/attachments.vue +++ b/pages/devices/_deviceId/attachments.vue @@ -50,7 +50,7 @@ export default class DeviceAttachmentsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceAttachments!:(id:string)=>void + loadDeviceAttachments!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/attachments/_attachmentId/edit.vue b/pages/devices/_deviceId/attachments/_attachmentId/edit.vue index 41ca21c037a350d5e2946f6abe5462dae818b0cf..09c1a66698136b90e725c82f6b9315398f11f98e 100644 --- a/pages/devices/_deviceId/attachments/_attachmentId/edit.vue +++ b/pages/devices/_deviceId/attachments/_attachmentId/edit.vue @@ -120,14 +120,13 @@ export default class AttachmentEditPage extends mixins(AttachmentsMixin) { private valueCopy: Attachment = new Attachment() // vuex definition for typescript check - loadDeviceAttachment!:(id:string)=>void - deviceAttachment!:Attachment - loadDeviceAttachments!:(id:string)=>void + loadDeviceAttachment!: (id: string) => void + deviceAttachment!: Attachment + loadDeviceAttachments!: (id: string) => void updateDeviceAttachment!: ({ deviceId, attachment - }: { deviceId: string, attachment: Attachment })=> Promise<void> - + }: { deviceId: string, attachment: Attachment }) => Promise<void> async created () { try { diff --git a/pages/devices/_deviceId/attachments/index.vue b/pages/devices/_deviceId/attachments/index.vue index 15f822fb36896b41361b43a095935ef51cf8c2e2..2370612826f552f548cd2ca4e54aaeae5740f06f 100644 --- a/pages/devices/_deviceId/attachments/index.vue +++ b/pages/devices/_deviceId/attachments/index.vue @@ -112,9 +112,8 @@ export default class DeviceAttachmentShowPage extends Vue { private attachmentToDelete: Attachment|null = null // vuex definition for typescript check - deleteDeviceAttachment!:(attachmentId: string)=>Promise<void> - loadDeviceAttachments!:(id:string)=>void - + deleteDeviceAttachment!: (attachmentId: string) => Promise<void> + loadDeviceAttachments!: (id: string) => void get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/attachments/new.vue b/pages/devices/_deviceId/attachments/new.vue index b24d16a4a55440788521b10409ca81491e3912a4..c227ccfa7d44100673fabebc95687768080421e5 100644 --- a/pages/devices/_deviceId/attachments/new.vue +++ b/pages/devices/_deviceId/attachments/new.vue @@ -144,13 +144,13 @@ export default class DeviceAttachmentAddPage extends mixins(Rules, UploadRules) private isSaving: boolean = false // vuex definition for typescript check - uploadFile!:(file: File)=> Promise<IUploadResult> - addDeviceAttachment!:( { + uploadFile!: (file: File) => Promise<IUploadResult> + addDeviceAttachment!: ({ deviceId, attachment - }: { deviceId: string, attachment: Attachment })=> Promise<void> - loadDeviceAttachments!:(id:string)=>void + }: { deviceId: string, attachment: Attachment }) => Promise<void> + loadDeviceAttachments!: (id: string) => void /** * returns a list of MimeTypes, seperated by , diff --git a/pages/devices/_deviceId/basic/edit.vue b/pages/devices/_deviceId/basic/edit.vue index 3ad1d5417deccdb32918a620b612054942bca472..6e6bee95b96df684dd8478fc92e1972919113af0 100644 --- a/pages/devices/_deviceId/basic/edit.vue +++ b/pages/devices/_deviceId/basic/edit.vue @@ -82,16 +82,16 @@ export default class DeviceEditBasicPage extends Vue { private isSaving: boolean = false // vuex definition for typescript check - device!:Device - saveDevice!:(device: Device)=> Promise<Device> - loadDevice!:( { + device!: Device + saveDevice!: (device: Device) => Promise<Device> + loadDevice!: ({ deviceId, includeContacts, includeCustomFields, includeDeviceProperties, includeDeviceAttachments }: - { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean })=>void + { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean }) => void created () { this.deviceCopy = Device.createFromObject(this.device) diff --git a/pages/devices/_deviceId/basic/index.vue b/pages/devices/_deviceId/basic/index.vue index 3fa7bb546c7010a05f9e61085e34ef4f8f2eccaf..83f6781a8940f2fe0a3a220365d41f9d5e105112 100644 --- a/pages/devices/_deviceId/basic/index.vue +++ b/pages/devices/_deviceId/basic/index.vue @@ -126,8 +126,8 @@ export default class DeviceShowBasicPage extends Vue { private showDeleteDialog: boolean = false // vuex definition for typescript check - device!:Device - deleteDevice!:(id: string)=>void + device!: Device + deleteDevice!: (id: string) => void get deviceId () { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/contacts.vue b/pages/devices/_deviceId/contacts.vue index 762dfe63ec08f451db72c2e4c3d3dbb23b2846d0..eee6d9b0878606847ba1d007f1f34c4b574ee73d 100644 --- a/pages/devices/_deviceId/contacts.vue +++ b/pages/devices/_deviceId/contacts.vue @@ -50,7 +50,7 @@ export default class DeviceContactsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceContacts!:(id:string) => void + loadDeviceContacts!: (id: string) => void created () { try { diff --git a/pages/devices/_deviceId/contacts/index.vue b/pages/devices/_deviceId/contacts/index.vue index e50246a2c459a1c87cedf52ac698ebd2ee3e064c..21e891f2fd1fc2e303a2275d685eef9a97fd494c 100644 --- a/pages/devices/_deviceId/contacts/index.vue +++ b/pages/devices/_deviceId/contacts/index.vue @@ -100,12 +100,12 @@ export default class DeviceShowContactPage extends Vue { private isSaving = false // vuex definition for typescript check - removeDeviceContact!:({ + removeDeviceContact!: ({ deviceId, contactId - }: { deviceId: string, contactId: string })=> Promise<void> - loadDeviceContacts!:(id:string) => void + }: { deviceId: string, contactId: string }) => Promise<void> + loadDeviceContacts!: (id: string) => void get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/contacts/new.vue b/pages/devices/_deviceId/contacts/new.vue index 7346d63cf0e3b74b657f03b1e4f5582a3cc156a4..d9ddcfd072f13874b4257ead3d1c2a179cd24e85 100644 --- a/pages/devices/_deviceId/contacts/new.vue +++ b/pages/devices/_deviceId/contacts/new.vue @@ -103,14 +103,14 @@ export default class DeviceAddContactPage extends Vue { private isSaving: boolean = false // vuex definition for typescript check - loadDeviceContacts!:(id:string) => void - loadAllContacts!:()=>void - contactsByDifference!:(contactsToSubtract: Contact[])=>Contact[] - deviceContacts!:Contact[] - addDeviceContact!:({ + loadDeviceContacts!: (id: string) => void + loadAllContacts!: () => void + contactsByDifference!: (contactsToSubtract: Contact[]) => Contact[] + deviceContacts!: Contact[] + addDeviceContact!: ({ deviceId, contactId - }: { deviceId: string, contactId: string })=> Promise<void> + }: { deviceId: string, contactId: string }) => Promise<void> async created () { try { diff --git a/pages/devices/_deviceId/customfields.vue b/pages/devices/_deviceId/customfields.vue index 98e3400065088ec63d70d1eb72d8d27c37ff50a5..c1789fb0dc60ca1617f3a572e8472ef11d45170a 100644 --- a/pages/devices/_deviceId/customfields.vue +++ b/pages/devices/_deviceId/customfields.vue @@ -50,7 +50,7 @@ export default class DeviceCustomFieldsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceCustomFields!:(id: string)=>void + loadDeviceCustomFields!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/customfields/_customfieldId/edit.vue b/pages/devices/_deviceId/customfields/_customfieldId/edit.vue index 70b1d06ea29ee76ae7be828c94038c038fb2f6dd..d7273e97750abfc591b9410cd22e883fba6a3e47 100644 --- a/pages/devices/_deviceId/customfields/_customfieldId/edit.vue +++ b/pages/devices/_deviceId/customfields/_customfieldId/edit.vue @@ -76,13 +76,14 @@ export default class DeviceCustomFieldsShowPage extends Vue { private valueCopy: CustomTextField = new CustomTextField() // vuex definition for typescript check - loadDeviceCustomField!:( id: string)=>void - deviceCustomField!:CustomTextField - updateDeviceCustomField!:({ + loadDeviceCustomField!: (id: string) => void + deviceCustomField!: CustomTextField + updateDeviceCustomField!: ({ deviceId, deviceCustomField - }: { deviceId: string, deviceCustomField: CustomTextField })=> Promise<void> - loadDeviceCustomFields!:(id: string)=>void + }: { deviceId: string, deviceCustomField: CustomTextField }) => Promise<void> + + loadDeviceCustomFields!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/customfields/index.vue b/pages/devices/_deviceId/customfields/index.vue index c1587f3d3cb8eec0b2e9364ef66d7562a8ced6f5..496dde7a17ee4f241d986f01f631320fc2054de7 100644 --- a/pages/devices/_deviceId/customfields/index.vue +++ b/pages/devices/_deviceId/customfields/index.vue @@ -112,9 +112,8 @@ export default class DeviceCustomFieldsShowPage extends Vue { private customFieldToDelete: CustomTextField|null = null // vuex definition for typescript check - loadDeviceCustomFields!:(id: string)=>void - deleteDeviceCustomField!:(customField: string)=>Promise<void> - + loadDeviceCustomFields!: (id: string) => void + deleteDeviceCustomField!: (customField: string) => Promise<void> get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/customfields/new.vue b/pages/devices/_deviceId/customfields/new.vue index af050d3e286a36fa3fec8911f003a03280db4a65..57b8f53456b9a9b6194b983d032c949f1093c7c2 100644 --- a/pages/devices/_deviceId/customfields/new.vue +++ b/pages/devices/_deviceId/customfields/new.vue @@ -84,11 +84,11 @@ export default class DeviceCustomFieldAddPage extends Vue { private customField: CustomTextField = new CustomTextField() // vuex definition for typescript check - loadDeviceCustomFields!:(id: string)=>void - addDeviceCustomField!:({ + loadDeviceCustomFields!: (id: string) => void + addDeviceCustomField!: ({ deviceId, deviceCustomField - }: { deviceId: string, deviceCustomField: CustomTextField })=> Promise<void> + }: { deviceId: string, deviceCustomField: CustomTextField }) => Promise<void> get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/measuredquantities.vue b/pages/devices/_deviceId/measuredquantities.vue index 50b6e802611c76218677c8cc422faf967ad642f2..50509dcba9069428ea03657234c96ba397053fae 100644 --- a/pages/devices/_deviceId/measuredquantities.vue +++ b/pages/devices/_deviceId/measuredquantities.vue @@ -53,12 +53,12 @@ export default class DevicePropertiesPage extends Vue { private isLoading = false // vuex definition for typescript check - loadDeviceMeasuredQuantities!:(id:string)=>void - loadCompartments!:()=>void - loadSamplingMedia!:()=>void - loadProperties!:()=>void - loadUnits!:()=>void - loadMeasuredQuantityUnits!:()=>void + loadDeviceMeasuredQuantities!: (id: string) => void + loadCompartments!: () => void + loadSamplingMedia!: () => void + loadProperties!: () => void + loadUnits!: () => void + loadMeasuredQuantityUnits!: () => void async created () { try { diff --git a/pages/devices/_deviceId/measuredquantities/_measuredquantityId/edit.vue b/pages/devices/_deviceId/measuredquantities/_measuredquantityId/edit.vue index c20092b7915db89a48ffca27ae327aa6fca0e46d..4424afa28548492b6e73750c2c86fd6622111393 100644 --- a/pages/devices/_deviceId/measuredquantities/_measuredquantityId/edit.vue +++ b/pages/devices/_deviceId/measuredquantities/_measuredquantityId/edit.vue @@ -95,13 +95,14 @@ export default class DevicePropertyEditPage extends Vue { private valueCopy: DeviceProperty = new DeviceProperty() // vuex definition for typescript check - loadDeviceMeasuredQuantity!:(id:String)=>void - deviceMeasuredQuantity!:DeviceProperty - updateDeviceMeasuredQuantity!:({ + loadDeviceMeasuredQuantity!: (id: String) => void + deviceMeasuredQuantity!: DeviceProperty + updateDeviceMeasuredQuantity!: ({ deviceId, deviceMeasuredQuantity - }: { deviceId: string, deviceMeasuredQuantity: DeviceProperty })=> Promise<void> - loadDeviceMeasuredQuantities!:(id:string)=>void + }: { deviceId: string, deviceMeasuredQuantity: DeviceProperty }) => Promise<void> + + loadDeviceMeasuredQuantities!: (id: string) => void async created () { try { diff --git a/pages/devices/_deviceId/measuredquantities/index.vue b/pages/devices/_deviceId/measuredquantities/index.vue index f41e25dd0ae82c0c01b193a7ebf21856273c27cf..b4d69ba5d7ebfc2f11a2bef71b3496cb2337909a 100644 --- a/pages/devices/_deviceId/measuredquantities/index.vue +++ b/pages/devices/_deviceId/measuredquantities/index.vue @@ -131,8 +131,8 @@ export default class DevicePropertyShowPage extends Vue { private measuredQuantityToDelete: DeviceProperty | null = null // vuex definition for typescript check - loadDeviceMeasuredQuantities!:(id:string)=>void - deleteDeviceMeasuredQuantity!:(measuredQuantityId: string)=>Promise<void> + loadDeviceMeasuredQuantities!: (id: string) => void + deleteDeviceMeasuredQuantity!: (measuredQuantityId: string) => Promise<void> get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/_deviceId/measuredquantities/new.vue b/pages/devices/_deviceId/measuredquantities/new.vue index e6538c1a97d9f39e41138532322e99f4d085a3ab..1d467d82ac53751389f92c4e2fcf4fb63f2c083f 100644 --- a/pages/devices/_deviceId/measuredquantities/new.vue +++ b/pages/devices/_deviceId/measuredquantities/new.vue @@ -91,11 +91,12 @@ export default class DevicePropertyAddPage extends Vue { private valueCopy: DeviceProperty = new DeviceProperty() // vuex definition for typescript check - addDeviceMeasuredQuantity!:({ + addDeviceMeasuredQuantity!: ({ deviceId, deviceMeasuredQuantity - }: { deviceId: string, deviceMeasuredQuantity: DeviceProperty })=> Promise<void> - loadDeviceMeasuredQuantities!:(id:string)=>void + }: { deviceId: string, deviceMeasuredQuantity: DeviceProperty }) => Promise<void> + + loadDeviceMeasuredQuantities!: (id: string) => void get deviceId (): string { return this.$route.params.deviceId diff --git a/pages/devices/copy/_deviceId.vue b/pages/devices/copy/_deviceId.vue index 13b5a32d4cb09196fe448801ec27c42974e0b8be..a115d7719c4454be17238cc471cd5ce38af7f016 100644 --- a/pages/devices/copy/_deviceId.vue +++ b/pages/devices/copy/_deviceId.vue @@ -166,19 +166,20 @@ export default class DeviceCopyPage extends Vue { private inventoryNumberPlaceholder: string | null = null // vuex definition for typescript check - device!:Device - initDeviceCopyAppBar!:(id: string)=>void - setDefaults!:()=>void - copyDevice!:({ device, copyContacts, copyAttachments, copyMeasuredQuantities, copyCustomFields }: - {device: Device, copyContacts: boolean, copyAttachments: boolean, copyMeasuredQuantities: boolean, copyCustomFields: boolean})=>string - loadDevice!:({ + device!: Device + initDeviceCopyAppBar!: (id: string) => void + setDefaults!: () => void + copyDevice!: ({ device, copyContacts, copyAttachments, copyMeasuredQuantities, copyCustomFields }: + {device: Device, copyContacts: boolean, copyAttachments: boolean, copyMeasuredQuantities: boolean, copyCustomFields: boolean}) => string + + loadDevice!: ({ deviceId, includeContacts, includeCustomFields, includeDeviceProperties, includeDeviceAttachments }: - { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean })=>void + { deviceId: string, includeContacts: boolean, includeCustomFields: boolean, includeDeviceProperties: boolean, includeDeviceAttachments: boolean }) => void async created () { this.initDeviceCopyAppBar(this.deviceId) diff --git a/pages/devices/index.vue b/pages/devices/index.vue index 95fe5af389b2e558a94179a5848821fa5f779aa6..b3a53e5e574bf3cd5341cd9a502c0ed173cd72b1 100644 --- a/pages/devices/index.vue +++ b/pages/devices/index.vue @@ -260,7 +260,7 @@ import { Component, Vue } from 'nuxt-property-decorator' import { saveAs } from 'file-saver' -import { Commit, mapActions, mapState } from 'vuex' +import { mapActions, mapState } from 'vuex' import DeviceTypeSelect from '@/components/DeviceTypeSelect.vue' import ManufacturerSelect from '@/components/ManufacturerSelect.vue' import StatusSelect from '@/components/StatusSelect.vue' @@ -315,20 +315,20 @@ export default class SearchDevicesPage extends Vue { private deviceToDelete: Device | null = null // vuex definition for typescript check - initDevicesIndexAppBar!:()=>void - setDefaults!:()=>void - loadEquipmentstatus!:()=>void - loadDevicetypes!:()=>void - loadManufacturers!:()=>void - pageNumber!:number - setPageNumber!:(newPageNumber: number)=>void - searchDevicesPaginated!:( searchParams: IDeviceSearchParams)=>void - devices!:Device[] - exportAsCsv!:(searchParams: IDeviceSearchParams)=>Promise<Blob> - deleteDevice!:(id:string)=>void - equipmentstatus!:Status[] - devicetypes!: DeviceType[] - manufacturers!: Manufacturer[] + initDevicesIndexAppBar!: () => void + setDefaults!: () => void + loadEquipmentstatus!: () => void + loadDevicetypes!: () => void + loadManufacturers!: () => void + pageNumber!: number + setPageNumber!: (newPageNumber: number) => void + searchDevicesPaginated!: (searchParams: IDeviceSearchParams) => void + devices!: Device[] + exportAsCsv!: (searchParams: IDeviceSearchParams) => Promise<Blob> + deleteDevice!: (id: string) => void + equipmentstatus!: Status[] + devicetypes!: DeviceType[] + manufacturers!: Manufacturer[] async created () { try { @@ -445,8 +445,8 @@ export default class SearchDevicesPage extends Vue { } finally { this.processing = false } - } - } + } + } initDeleteDialog (device: Device) { this.showDeleteDialog = true diff --git a/pages/devices/new.vue b/pages/devices/new.vue index d38c3c9b1672d91b87d7c0b0cc784b1d3c133b7b..6964f02b65f1ae2ac4a22a8ecd372ee6e28796fe 100644 --- a/pages/devices/new.vue +++ b/pages/devices/new.vue @@ -89,9 +89,9 @@ export default class DeviceNewPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initDevicesNewAppBar!: ()=>void - setDefaults!:()=>void - saveDevice!:(device: Device)=> Promise<Device> + initDevicesNewAppBar!: () => void + setDefaults!: () => void + saveDevice!: (device: Device) => Promise<Device> created () { this.initDevicesNewAppBar() diff --git a/pages/platforms/_platformId.vue b/pages/platforms/_platformId.vue index 92fb69aa3f3f1d17656ae70d826e1a24efeb5394..956f3c27badca2e3eceb84d3ade41e5ca3d87c55 100644 --- a/pages/platforms/_platformId.vue +++ b/pages/platforms/_platformId.vue @@ -57,9 +57,9 @@ export default class PlatformPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initPlatformsPlatformIdAppBar!: (id:string)=>void - setDefaults!:()=>void - loadPlatform!:({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean})=>void + initPlatformsPlatformIdAppBar!: (id: string) => void + setDefaults!: () => void + loadPlatform!: ({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean}) => void async created () { try { diff --git a/pages/platforms/_platformId/actions.vue b/pages/platforms/_platformId/actions.vue index 441fa83feaaba3d863351ee24d548044612382ba..b2bb2bf265a315deacce33f07c91415194f7c52b 100644 --- a/pages/platforms/_platformId/actions.vue +++ b/pages/platforms/_platformId/actions.vue @@ -54,7 +54,7 @@ export default class PlatformActionsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadAllPlatformActions!:(id:string)=>void + loadAllPlatformActions!: (id: string) => void async created () { try { diff --git a/pages/platforms/_platformId/actions/generic-platform-actions/_actionId/edit.vue b/pages/platforms/_platformId/actions/generic-platform-actions/_actionId/edit.vue index 41741d881451cdc18ba9316747a7ade9eca81aed..b1407f7815f68652e6c9d49ba030c38617c67bee 100644 --- a/pages/platforms/_platformId/actions/generic-platform-actions/_actionId/edit.vue +++ b/pages/platforms/_platformId/actions/generic-platform-actions/_actionId/edit.vue @@ -99,12 +99,11 @@ export default class EditPlatformAction extends Vue { private isLoading = false // vuex definition for typescript check - loadAllPlatformActions!:(id:string)=>void - loadPlatformGenericAction!:(actionId: string)=>void - loadPlatformAttachments!:(id: string)=>void - platformGenericAction!:GenericAction - updatePlatformGenericAction!:({ platformId, genericPlatformAction }: {platformId: string, genericPlatformAction: GenericAction})=> Promise<GenericAction> - + loadAllPlatformActions!: (id: string) => void + loadPlatformGenericAction!: (actionId: string) => void + loadPlatformAttachments!: (id: string) => void + platformGenericAction!: GenericAction + updatePlatformGenericAction!: ({ platformId, genericPlatformAction }: {platformId: string, genericPlatformAction: GenericAction}) => Promise<GenericAction> async created () { try { diff --git a/pages/platforms/_platformId/actions/index.vue b/pages/platforms/_platformId/actions/index.vue index 18c2380a5d3f837318a18d78471700dba0ebca7a..e8cc6ef3b5e22ce5262fd222d1072bd661b78c61 100644 --- a/pages/platforms/_platformId/actions/index.vue +++ b/pages/platforms/_platformId/actions/index.vue @@ -162,10 +162,9 @@ export default class PlatformActionsShowPage extends Vue { private showDeleteDialog: boolean = false // vuex definition for typescript check - loadAllPlatformActions!:(id:string)=>void - deletePlatformGenericAction!:(genericPlatformActionId: string)=> Promise<void> - deletePlatformSoftwareUpdateAction!:(softwareUpdateActionId: string)=> Promise<void> - + loadAllPlatformActions!: (id: string) => void + deletePlatformGenericAction!: (genericPlatformActionId: string) => Promise<void> + deletePlatformSoftwareUpdateAction!: (softwareUpdateActionId: string) => Promise<void> get platformId (): string { return this.$route.params.platformId @@ -215,7 +214,7 @@ export default class PlatformActionsShowPage extends Vue { } async deleteGenericAction () { - if(this.genericActionToDelete === null || this.genericActionToDelete.id ===null){ + if (this.genericActionToDelete === null || this.genericActionToDelete.id === null) { return } @@ -233,7 +232,7 @@ export default class PlatformActionsShowPage extends Vue { } async deleteSoftwareUpdateAction () { - if(this.softwareUpdateActionToDelete === null || this.softwareUpdateActionToDelete.id ===null){ + if (this.softwareUpdateActionToDelete === null || this.softwareUpdateActionToDelete.id === null) { return } diff --git a/pages/platforms/_platformId/actions/new.vue b/pages/platforms/_platformId/actions/new.vue index 3fcdedb4fb358e71ff60f9fdef564ce7e6575471..eecf8a35f6aeebe71c2610ea5697d907eaab4878 100644 --- a/pages/platforms/_platformId/actions/new.vue +++ b/pages/platforms/_platformId/actions/new.vue @@ -84,10 +84,10 @@ export default class NewPlatformAction extends Vue { private isLoading: boolean = false // vuex definition for typescript check - loadPlatformGenericActionTypes!:()=>void - loadPlatformAttachments!:(id:string)=>void - chosenKindOfPlatformAction!:IOptionsForActionType | null - setChosenKindOfPlatformAction!:(newval: IOptionsForActionType | null) =>void + loadPlatformGenericActionTypes!: () => void + loadPlatformAttachments!: (id: string) => void + chosenKindOfPlatformAction!: IOptionsForActionType | null + setChosenKindOfPlatformAction!: (newval: IOptionsForActionType | null) => void async created () { try { diff --git a/pages/platforms/_platformId/actions/new/generic-platform-actions.vue b/pages/platforms/_platformId/actions/new/generic-platform-actions.vue index 9066731fc1b746158cb635692dc0b689ff883d0b..6cde64c42836e70b45fcc10c0bf3b00dbd5aaf63 100644 --- a/pages/platforms/_platformId/actions/new/generic-platform-actions.vue +++ b/pages/platforms/_platformId/actions/new/generic-platform-actions.vue @@ -81,9 +81,9 @@ export default class NewGenericPlatformAction extends Vue { private isSaving: boolean = false // vuex definition for typescript check - chosenKindOfPlatformAction!:IOptionsForActionType | null - addPlatformGenericAction!:({ platformId, genericPlatformAction }: {platformId: string, genericPlatformAction: GenericAction})=> Promise<GenericAction> - loadAllPlatformActions!:(id:string)=>void + chosenKindOfPlatformAction!: IOptionsForActionType | null + addPlatformGenericAction!: ({ platformId, genericPlatformAction }: {platformId: string, genericPlatformAction: GenericAction}) => Promise<GenericAction> + loadAllPlatformActions!: (id: string) => void created () { if (this.chosenKindOfPlatformAction === null) { diff --git a/pages/platforms/_platformId/actions/new/software-update-actions.vue b/pages/platforms/_platformId/actions/new/software-update-actions.vue index d1cbee8b21ec684b3205ea9564ee8d11f59dcad6..ed3018190d825745b15f5a3f0509a8cc5c42775e 100644 --- a/pages/platforms/_platformId/actions/new/software-update-actions.vue +++ b/pages/platforms/_platformId/actions/new/software-update-actions.vue @@ -84,9 +84,9 @@ export default class NewPlatformSoftwareUpdateActions extends Vue { private isSaving: boolean = false // vuex definition for typescript check - chosenKindOfPlatformAction!:IOptionsForActionType | null - addPlatformSoftwareUpdateAction!:({ platformId, softwareUpdateAction }: {platformId: string, softwareUpdateAction: SoftwareUpdateAction})=> Promise<SoftwareUpdateAction> - loadAllPlatformActions!:(id:string)=>void + chosenKindOfPlatformAction!: IOptionsForActionType | null + addPlatformSoftwareUpdateAction!: ({ platformId, softwareUpdateAction }: {platformId: string, softwareUpdateAction: SoftwareUpdateAction}) => Promise<SoftwareUpdateAction> + loadAllPlatformActions!: (id: string) => void created () { if (this.chosenKindOfPlatformAction === null) { diff --git a/pages/platforms/_platformId/actions/software-update-actions/_actionId/edit.vue b/pages/platforms/_platformId/actions/software-update-actions/_actionId/edit.vue index 48da19f6df27f8f9857541746079f7734f3553fb..58c1d40c63c083a1384051239190c5ef504a7480 100644 --- a/pages/platforms/_platformId/actions/software-update-actions/_actionId/edit.vue +++ b/pages/platforms/_platformId/actions/software-update-actions/_actionId/edit.vue @@ -95,11 +95,11 @@ export default class PlatformSoftwareUpdateActionEditPage extends Vue { private isLoading = false // vuex definition for typescript check - loadPlatformSoftwareUpdateAction!:(actionId: string)=>void - loadPlatformAttachments!:(id: string)=>void - platformSoftwareUpdateAction!:SoftwareUpdateAction - updatePlatformSoftwareUpdateAction!:( { platformId, softwareUpdateAction }: {platformId: string, softwareUpdateAction: SoftwareUpdateAction})=> Promise<SoftwareUpdateAction> - loadAllPlatformActions!:(id:string)=>void + loadPlatformSoftwareUpdateAction!: (actionId: string) => void + loadPlatformAttachments!: (id: string) => void + platformSoftwareUpdateAction!: SoftwareUpdateAction + updatePlatformSoftwareUpdateAction!: ({ platformId, softwareUpdateAction }: {platformId: string, softwareUpdateAction: SoftwareUpdateAction}) => Promise<SoftwareUpdateAction> + loadAllPlatformActions!: (id: string) => void async created () { try { diff --git a/pages/platforms/_platformId/attachments.vue b/pages/platforms/_platformId/attachments.vue index 5f180eb627b07dffffe13b6083a98cedf2032726..e9be504f0233aa18bb63bcb737255fe9530f22a0 100644 --- a/pages/platforms/_platformId/attachments.vue +++ b/pages/platforms/_platformId/attachments.vue @@ -51,7 +51,7 @@ export default class PlatformAttachmentsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadPlatformAttachments!:(id:string)=>void + loadPlatformAttachments!: (id: string) => void async created () { try { diff --git a/pages/platforms/_platformId/attachments/_attachmentId/edit.vue b/pages/platforms/_platformId/attachments/_attachmentId/edit.vue index 62991383a1ab85658ac25df663dc0da18b4df570..289a8a4a7e1f3cddfed75d16f61fdd53d1794bfd 100644 --- a/pages/platforms/_platformId/attachments/_attachmentId/edit.vue +++ b/pages/platforms/_platformId/attachments/_attachmentId/edit.vue @@ -122,10 +122,10 @@ export default class AttachmentEditPage extends mixins(AttachmentsMixin) { private valueCopy: Attachment = new Attachment() // vuex definition for typescript check - loadPlatformAttachment!:(id: string)=>void - platformAttachment!:Attachment - updatePlatformAttachment!:({ platformId, attachment }: {platformId: string, attachment: Attachment})=> Promise<void> - loadPlatformAttachments!:(id:string)=>void + loadPlatformAttachment!: (id: string) => void + platformAttachment!: Attachment + updatePlatformAttachment!: ({ platformId, attachment }: {platformId: string, attachment: Attachment}) => Promise<void> + loadPlatformAttachments!: (id: string) => void async created () { try { diff --git a/pages/platforms/_platformId/attachments/index.vue b/pages/platforms/_platformId/attachments/index.vue index 0ea0918d90168b1c3233b57f0720e34b934188e1..45b9416dac50ed447967ba9c057357559aa3c6a9 100644 --- a/pages/platforms/_platformId/attachments/index.vue +++ b/pages/platforms/_platformId/attachments/index.vue @@ -115,8 +115,8 @@ export default class PlatformAttachmentShowPage extends Vue { private attachmentToDelete: Attachment|null = null // vuex definition for typescript check - loadPlatformAttachments!:(id:string)=>void - deletePlatformAttachment!:(attachmentId: string)=>Promise<void> + loadPlatformAttachments!: (id: string) => void + deletePlatformAttachment!: (attachmentId: string) => Promise<void> get platformId (): string { return this.$route.params.platformId diff --git a/pages/platforms/_platformId/attachments/new.vue b/pages/platforms/_platformId/attachments/new.vue index 939584ef5e01d9cf50adcac32feaee5223c3fee7..3280c3842fba91034947fb33c18f9a8bb5be65c0 100644 --- a/pages/platforms/_platformId/attachments/new.vue +++ b/pages/platforms/_platformId/attachments/new.vue @@ -134,10 +134,9 @@ export default class PlatformAttachmentAddPage extends mixins(Rules, UploadRules private isSaving: boolean = false // vuex definition for typescript check - uploadFile!:(file: File)=> Promise<IUploadResult> - addPlatformAttachment!:( { platformId, attachment }: {platformId: string, attachment: Attachment})=> Promise<void> - loadPlatformAttachments!:(id:string)=>void - + uploadFile!: (file: File) => Promise<IUploadResult> + addPlatformAttachment!: ({ platformId, attachment }: {platformId: string, attachment: Attachment}) => Promise<void> + loadPlatformAttachments!: (id: string) => void /** * returns a list of MimeTypes, seperated by , diff --git a/pages/platforms/_platformId/basic/edit.vue b/pages/platforms/_platformId/basic/edit.vue index 334310d7a1734b9eadea896603956983fe5d8abd..dce95e60c1d823e9689896459cad7bbc233f78ef 100644 --- a/pages/platforms/_platformId/basic/edit.vue +++ b/pages/platforms/_platformId/basic/edit.vue @@ -85,9 +85,9 @@ export default class PlatformEditBasicPage extends Vue { private isSaving: boolean = false // vuex definition for typescript check - platform!:Platform - savePlatform!:( platform: Platform)=> Promise<Platform> - loadPlatform!:({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean})=>void + platform!: Platform + savePlatform!: (platform: Platform) => Promise<Platform> + loadPlatform!: ({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean}) => void created () { this.platformCopy = Platform.createFromObject(this.platform) diff --git a/pages/platforms/_platformId/basic/index.vue b/pages/platforms/_platformId/basic/index.vue index 0787fe00f7a4384c8cdf070d866edbea943592e9..1c40dfc50f657b071369cbad996538516e55e5f5 100644 --- a/pages/platforms/_platformId/basic/index.vue +++ b/pages/platforms/_platformId/basic/index.vue @@ -129,8 +129,8 @@ export default class PlatformShowBasicPage extends Vue { private showDeleteDialog: boolean = false // vuex definition for typescript check - platform!:Platform - deletePlatform!:(id: string)=>void + platform!: Platform + deletePlatform!: (id: string) => void get platformId () { return this.$route.params.platformId @@ -146,7 +146,7 @@ export default class PlatformShowBasicPage extends Vue { async deleteAndCloseDialog () { this.showDeleteDialog = false - if (this.platform === null || this.platform.id ===null) { + if (this.platform === null || this.platform.id === null) { return } diff --git a/pages/platforms/_platformId/contacts.vue b/pages/platforms/_platformId/contacts.vue index ab90c5eaa9e8d9ef0bc35f5b86927515ff8ab9a8..6a5e5d827086430e0e0c77556f9db36c69e16918 100644 --- a/pages/platforms/_platformId/contacts.vue +++ b/pages/platforms/_platformId/contacts.vue @@ -55,7 +55,7 @@ export default class PlatformContactsPage extends Vue { private isLoading = false // vuex definition for typescript check - loadPlatformContacts!:(id: string)=>void + loadPlatformContacts!: (id: string) => void async created () { try { diff --git a/pages/platforms/_platformId/contacts/index.vue b/pages/platforms/_platformId/contacts/index.vue index 3b0e1ba76c3de7810e3dae3888939a372d19d64b..aff3149e03d9eb7889205c09a4dc3d45972820eb 100644 --- a/pages/platforms/_platformId/contacts/index.vue +++ b/pages/platforms/_platformId/contacts/index.vue @@ -104,8 +104,8 @@ export default class PlatformShowContactPage extends Vue { private isSaving = false // vuex definition for typescript check - removePlatformContact!:({ platformId, contactId }: {platformId: string, contactId: string})=> Promise<void> - loadPlatformContacts!:(id:string)=>void + removePlatformContact!: ({ platformId, contactId }: {platformId: string, contactId: string}) => Promise<void> + loadPlatformContacts!: (id: string) => void get platformId (): string { return this.$route.params.platformId diff --git a/pages/platforms/_platformId/contacts/new.vue b/pages/platforms/_platformId/contacts/new.vue index 0d2cac29581b3736da1eee0f698013a173957120..65ba264bcb4ea3f1db441e4dc26e417f7e343a77 100644 --- a/pages/platforms/_platformId/contacts/new.vue +++ b/pages/platforms/_platformId/contacts/new.vue @@ -104,11 +104,11 @@ export default class PlatformAddContactPage extends Vue { private isSaving: boolean = false // vuex definition for typescript check - loadAllContacts!:()=>void - loadPlatformContacts!:(id: string)=>void - contactsByDifference!:(contactsToSubtract: Contact[])=>Contact[] - platformContacts!:Contact[] - addPlatformContact!:({ platformId, contactId }: {platformId: string, contactId: string})=> Promise<void> + loadAllContacts!: () => void + loadPlatformContacts!: (id: string) => void + contactsByDifference!: (contactsToSubtract: Contact[]) => Contact[] + platformContacts!: Contact[] + addPlatformContact!: ({ platformId, contactId }: {platformId: string, contactId: string}) => Promise<void> async created () { try { diff --git a/pages/platforms/copy/_platformId.vue b/pages/platforms/copy/_platformId.vue index d5217e98109275890876bef6cfd88751576a6d95..04bd309668e74574894b6bdaeb92f3b641ce2eef 100644 --- a/pages/platforms/copy/_platformId.vue +++ b/pages/platforms/copy/_platformId.vue @@ -119,7 +119,7 @@ permissions and limitations under the Licence. <script lang="ts"> import { Component, Vue } from 'nuxt-property-decorator' -import { Dispatch, mapActions, mapState } from 'vuex' +import { mapActions, mapState } from 'vuex' import { Platform } from '@/models/Platform' import PlatformBasicDataForm from '@/components/PlatformBasicDataForm.vue' @@ -153,13 +153,13 @@ export default class PlatformCopyPage extends Vue { private inventoryNumberPlaceholder: string | null = null // vuex definition for typescript check - platform!:Platform - initPlatformCopyAppBar!:(id: string)=>void - setDefaults!:()=>void - loadPlatform!:({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean})=>void - copyPlatform!:( { platform, copyContacts, copyAttachments }: {platform: Platform, copyContacts: boolean, copyAttachments: boolean})=>string + platform!: Platform + initPlatformCopyAppBar!: (id: string) => void + setDefaults!: () => void + loadPlatform!: ({ platformId, includeContacts, includePlatformAttachments }: {platformId: string, includeContacts: boolean, includePlatformAttachments: boolean}) => void + copyPlatform!: ({ platform, copyContacts, copyAttachments }: {platform: Platform, copyContacts: boolean, copyAttachments: boolean}) => string - async created () { + async created () { this.initPlatformCopyAppBar(this.platformId) // We also load the contacts and the measured quantities as those // are the ones that we will also copy. diff --git a/pages/platforms/index.vue b/pages/platforms/index.vue index 4618eda83cd69157d88ed6cf2e0eaa9b1c7640cd..fd4e53e105e9a0391963782088909e528fc68ca8 100644 --- a/pages/platforms/index.vue +++ b/pages/platforms/index.vue @@ -288,22 +288,21 @@ export default class SearchPlatformsPage extends Vue { private platformToDelete: Platform | null = null // vuex definition for typescript check - loadEquipmentstatus!:()=>void - loadPlatformtypes!:()=>void - loadManufacturers!:()=>void - initPlatformsIndexAppBar!:()=>void - setDefaults!:()=>void - pageNumber!:number - setPageNumber!:(newPageNumber: number)=>void - searchPlatformsPaginated!:(searchParams: IPlatformSearchParams)=>void - platforms!:Platform[] - exportAsCsv!:(searchParams: IPlatformSearchParams)=> Promise<Blob> - deletePlatform!:(id:string)=>void - platformtypes!: PlatformType[] - manufacturers!: Manufacturer[] + loadEquipmentstatus!: () => void + loadPlatformtypes!: () => void + loadManufacturers!: () => void + initPlatformsIndexAppBar!: () => void + setDefaults!: () => void + pageNumber!: number + setPageNumber!: (newPageNumber: number) => void + searchPlatformsPaginated!: (searchParams: IPlatformSearchParams) => void + platforms!: Platform[] + exportAsCsv!: (searchParams: IPlatformSearchParams) => Promise<Blob> + deletePlatform!: (id: string) => void + platformtypes!: PlatformType[] + manufacturers!: Manufacturer[] equipmentstatus!: Status[] - async created () { try { this.loading = true @@ -366,7 +365,7 @@ export default class SearchPlatformsPage extends Vue { await this.runSearch() } - basicSearch (){ + basicSearch () { this.selectedSearchManufacturers = [] this.selectedSearchStates = [] this.selectedSearchPlatformTypes = [] diff --git a/pages/platforms/new.vue b/pages/platforms/new.vue index 9713b3d6cdaf557f9e920bd78e6a1d455746d7d4..2bb9bca3c01023efacf1bc50a757f974357656ec 100644 --- a/pages/platforms/new.vue +++ b/pages/platforms/new.vue @@ -92,9 +92,9 @@ export default class PlatformNewPage extends Vue { private isLoading: boolean = false // vuex definition for typescript check - initPlatformsNewAppBar!:()=>void - setDefaults!:()=>void - savePlatform!:(platform: Platform)=> Promise<Platform> + initPlatformsNewAppBar!: () => void + setDefaults!: () => void + savePlatform!: (platform: Platform) => Promise<Platform> created () { this.initPlatformsNewAppBar() diff --git a/store/configurations.ts b/store/configurations.ts index 4e4987929b703721a1f30dd6ca178a90a8a8fb56..e17a72dc1031743a48d10fbabaac074b229471d3 100644 --- a/store/configurations.ts +++ b/store/configurations.ts @@ -231,11 +231,10 @@ const getters = { } } - // @ts-ignore -const actions:{ - [key:string]: any; - $api:Api +const actions: { + [key: string]: any; + $api: Api } = { async searchConfigurationsPaginated ({ commit, diff --git a/store/contacts.ts b/store/contacts.ts index 5bff43568949226d2080af77fef0d86edb8a4d45..c7bd1e1b83b9a2e861b1443c5db4011694ca63cd 100644 --- a/store/contacts.ts +++ b/store/contacts.ts @@ -35,6 +35,7 @@ */ import { Commit, ActionContext } from 'vuex/types' import { Contact } from '@/models/Contact' +import { Api } from '@/services/Api' interface contactsState { contacts: Contact[], @@ -65,7 +66,12 @@ export const getters = { }) } } -export const actions = { + +// @ts-ignore +export const actions: { + [key: string]: any; + $api: Api +} = { async searchContactsPaginated ({ commit, state diff --git a/store/devices.ts b/store/devices.ts index 28ec3065ef1851c65cca2f17bd4ea49388b0f982..c007e3dc54cdeae8f3641846c128aa149bd88a81 100644 --- a/store/devices.ts +++ b/store/devices.ts @@ -77,8 +77,8 @@ interface devicesState { deviceGenericAction: GenericAction | null, deviceSoftwareUpdateAction: SoftwareUpdateAction | null, deviceCalibrationAction: DeviceCalibrationAction | null, - deviceMountActions: DeviceMountAction[], - deviceUnmountActions: DeviceUnmountAction[], + deviceMountActions: DeviceMountActionWrapper[], + deviceUnmountActions: DeviceUnmountActionWrapper[], chosenKindOfDeviceAction: IOptionsForActionType | null, deviceCustomFields: CustomTextField[], deviceCustomField: CustomTextField|null @@ -121,9 +121,8 @@ const getters = { ...state.deviceCalibrationActions ] // sort the actions - actions = actions.sort((a:IDateCompareable, b:IDateCompareable): number => { - if(a.date === null) return 0 - if(b.date === null) return 0 + actions = actions.sort((a: IDateCompareable, b: IDateCompareable): number => { + if (a.date === null || b.date === null) { return 0 } return a.date < b.date ? 1 : a.date > b.date ? -1 : 0 }) return actions @@ -131,9 +130,9 @@ const getters = { } // @ts-ignore -const actions:{ - [key:string]: any; - $api:Api +const actions: { + [key: string]: any; + $api: Api } = { async searchDevicesPaginated ({ commit, @@ -482,10 +481,10 @@ const mutations = { setDeviceSoftwareUpdateAction (state: devicesState, deviceSoftwareUpdateAction: SoftwareUpdateAction) { state.deviceSoftwareUpdateAction = deviceSoftwareUpdateAction }, - setDeviceMountActions (state: devicesState, deviceMountActions: DeviceMountAction[]) { + setDeviceMountActions (state: devicesState, deviceMountActions: DeviceMountActionWrapper[]) { state.deviceMountActions = deviceMountActions }, - setDeviceUnmountActions (state: devicesState, deviceUnmountActions: DeviceUnmountAction[]) { + setDeviceUnmountActions (state: devicesState, deviceUnmountActions: DeviceUnmountActionWrapper[]) { state.deviceUnmountActions = deviceUnmountActions }, setDeviceCalibrationActions (state: devicesState, deviceCalibrationActions: DeviceCalibrationAction[]) { diff --git a/store/files.ts b/store/files.ts index bf757ed833c9afb32e7e3d4ff54545573543c4a5..ebbbde8cdcecd5110da9ca85b18fec0a866ee594 100644 --- a/store/files.ts +++ b/store/files.ts @@ -32,11 +32,16 @@ */ import { Commit } from 'vuex' import { IUploadResult } from '@/services/sms/UploadApi' +import { Api } from '@/services/Api' const state = {} const getters = {} -const actions = { +// @ts-ignore +const actions: { + [key: string]: any; + $api: Api +} = { uploadFile ({ _commit }: {_commit: Commit}, file: File): Promise<IUploadResult> { return this.$api.upload.file(file) } diff --git a/store/platforms.ts b/store/platforms.ts index 985d17cf35e6aa8e84690d61d090acd38190020a..245666394ea5d1fbc7a0739b318f46727b3f7704 100644 --- a/store/platforms.ts +++ b/store/platforms.ts @@ -37,12 +37,13 @@ import { Contact } from '@/models/Contact' import { Attachment } from '@/models/Attachment' import { GenericAction } from '@/models/GenericAction' import { SoftwareUpdateAction } from '@/models/SoftwareUpdateAction' -import { PlatformUnmountAction } from '@/models/PlatformUnmountAction' -import { PlatformMountAction } from '@/models/PlatformMountAction' +import { PlatformUnmountAction } from '@/models/views/platforms/actions/PlatformUnmountAction' +import { PlatformMountAction } from '@/models/views/platforms/actions/PlatformMountAction' import { IActionType } from '@/models/ActionType' import { PlatformMountActionWrapper } from '@/viewmodels/PlatformMountActionWrapper' import { PlatformUnmountActionWrapper } from '@/viewmodels/PlatformUnmountActionWrapper' import { IDateCompareable } from '@/modelUtils/Compareables' +import { Api } from '@/services/Api' const KIND_OF_ACTION_TYPE_SOFTWARE_UPDATE = 'software_update' const KIND_OF_ACTION_TYPE_GENERIC_PLATFORM_ACTION = 'generic_platform_action' @@ -63,8 +64,8 @@ interface platformsState { platformGenericAction: GenericAction|null, platformSoftwareUpdateActions: SoftwareUpdateAction[], platformSoftwareUpdateAction: SoftwareUpdateAction|null, - platformMountActions: PlatformMountAction[], - platformUnmountActions: PlatformUnmountAction[], + platformMountActions: PlatformMountActionWrapper[], + platformUnmountActions: PlatformUnmountActionWrapper[], chosenKindOfPlatformAction: IOptionsForActionType | null, pageNumber: number, pageSize: number, @@ -99,13 +100,18 @@ const getters = { ] // sort the actions actions = actions.sort((a: IDateCompareable, b: IDateCompareable): number => { + if (a.date === null || b.date === null) { return 0 } return a.date < b.date ? 1 : a.date > b.date ? -1 : 0 }) return actions } } -const actions = { +// @ts-ignore +const actions: { + [key: string]: any; + $api: Api +} = { async searchPlatformsPaginated ({ commit, state @@ -163,15 +169,15 @@ const actions = { await dispatch('loadPlatformMountActions', id) await dispatch('loadPlatformUnmountActions', id) }, - async loadPlatformGenericActions ({ commit }: { commit: Commit }, id: number) { + async loadPlatformGenericActions ({ commit }: { commit: Commit }, id: string) { const platformGenericActions = await this.$api.platforms.findRelatedGenericActions(id) commit('setPlatformGenericActions', platformGenericActions) }, - async loadPlatformSoftwareUpdateActions ({ commit }: { commit: Commit }, id: number) { + async loadPlatformSoftwareUpdateActions ({ commit }: { commit: Commit }, id: string) { const platformSoftwareUpdateActions = await this.$api.platforms.findRelatedSoftwareUpdateActions(id) commit('setPlatformSoftwareUpdateActions', platformSoftwareUpdateActions) }, - async loadPlatformMountActions ({ commit }: { commit: Commit }, id: number) { + async loadPlatformMountActions ({ commit }: { commit: Commit }, id: string) { const platformMountActions = await this.$api.platforms.findRelatedMountActions(id) const wrappedPlatformMountActions = platformMountActions.map((action: PlatformMountAction) => { @@ -180,7 +186,7 @@ const actions = { commit('setPlatformMountActions', wrappedPlatformMountActions) }, - async loadPlatformUnmountActions ({ commit }: { commit: Commit }, id: number) { + async loadPlatformUnmountActions ({ commit }: { commit: Commit }, id: string) { const platformUnmountActions = await this.$api.platforms.findRelatedUnmountActions(id) const wrappedPlatformUnmountActions = platformUnmountActions.map((action: PlatformUnmountAction) => { @@ -199,13 +205,13 @@ const actions = { addPlatformContact ({ _commit }: { _commit: Commit }, { platformId, contactId }: {platformId: string, contactId: string}): Promise<void> { return this.$api.platforms.addContact(platformId, contactId) }, - removePlatformContact ({ _commit }: { _commit: Commit }, { platformId, contactId }: {platformId: number, contactId: number}): Promise<void> { + removePlatformContact ({ _commit }: { _commit: Commit }, { platformId, contactId }: {platformId: string, contactId: string}): Promise<void> { return this.$api.platforms.removeContact(platformId, contactId) }, - addPlatformAttachment ({ _commit }: { _commit: Commit }, { platformId, attachment }: {platformId: string, attachment: Attachment}): Promise<void> { + addPlatformAttachment ({ _commit }: { _commit: Commit }, { platformId, attachment }: {platformId: string, attachment: Attachment}): Promise<Attachment> { return this.$api.platformAttachments.add(platformId, attachment) }, - updatePlatformAttachment ({ _commit }: { _commit: Commit }, { platformId, attachment }: {platformId: string, attachment: Attachment}): Promise<void> { + updatePlatformAttachment ({ _commit }: { _commit: Commit }, { platformId, attachment }: {platformId: string, attachment: Attachment}): Promise<Attachment> { return this.$api.platformAttachments.update(platformId, attachment) }, deletePlatformAttachment ({ _commit }: { _commit: Commit }, attachmentId: string): Promise<void> { @@ -318,10 +324,10 @@ const mutations = { setPlatformSoftwareUpdateActions (state: platformsState, platformSoftwareUpdateActions: SoftwareUpdateAction[]) { state.platformSoftwareUpdateActions = platformSoftwareUpdateActions }, - setPlatformMountActions (state: platformsState, platformMountActions: PlatformMountAction[]) { + setPlatformMountActions (state: platformsState, platformMountActions: PlatformMountActionWrapper[]) { state.platformMountActions = platformMountActions }, - setPlatformUnmountActions (state: platformsState, platformUnmountActions: PlatformUnmountAction[]) { + setPlatformUnmountActions (state: platformsState, platformUnmountActions: PlatformUnmountActionWrapper[]) { state.platformUnmountActions = platformUnmountActions }, setChosenKindOfPlatformAction (state: platformsState, newVal: IOptionsForActionType | null) { diff --git a/store/vocabulary.ts b/store/vocabulary.ts index 42f0364b939905a7d220186a7f0968b1f1b630c4..376fba84bb4688fa5993d6afd63d72415a8ec5a1 100644 --- a/store/vocabulary.ts +++ b/store/vocabulary.ts @@ -42,6 +42,7 @@ import { SamplingMedia } from '@/models/SamplingMedia' import { Property } from '@/models/Property' import { Unit } from '@/models/Unit' import { MeasuredQuantityUnit } from '@/models/MeasuredQuantityUnit' +import { Api } from '@/services/Api' const KIND_OF_ACTION_TYPE_SOFTWARE_UPDATE = 'software_update' const KIND_OF_ACTION_TYPE_GENERIC_PLATFORM_ACTION = 'generic_platform_action' @@ -140,8 +141,11 @@ const getters = { ].sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())) } } - -const actions = { +// @ts-ignore +const actions: { + [key: string]: any; + $api: Api +} = { async loadManufacturers ({ commit }: { commit: Commit }) { // @ts-ignore commit('setManufacturers', await this.$api.manufacturer.findAll())