-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show latest measurements in mobility single record views
- Loading branch information
Showing
6 changed files
with
113 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
databrowser/src/domain/cellComponents/components/cells/measurementsCell/MeasurementsCell.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<template> | ||
<EditListCell :items="data"> | ||
<template #table="{ items }"> | ||
<MeasurementsCellTable :items="items" /> | ||
</template> | ||
</EditListCell> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import EditListCell from '../../utils/editList/EditListCell.vue'; | ||
import MeasurementsCellTable from './MeasurementsCellTable.vue'; | ||
import { DataEntry } from './types'; | ||
defineProps<{ data?: DataEntry[] | null }>(); | ||
</script> |
59 changes: 59 additions & 0 deletions
59
...ser/src/domain/cellComponents/components/cells/measurementsCell/MeasurementsCellTable.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<template> | ||
<EditListTable :items="items"> | ||
<template #colGroup> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
<col class="w-32 md:w-40" /> | ||
</template> | ||
|
||
<template #tableHeader> | ||
<TableHeaderCell>tdescription</TableHeaderCell> | ||
<TableHeaderCell>tname</TableHeaderCell> | ||
<TableHeaderCell>ttype</TableHeaderCell> | ||
<TableHeaderCell>tunit</TableHeaderCell> | ||
<TableHeaderCell>tmetadata</TableHeaderCell> | ||
<TableHeaderCell>mvalue</TableHeaderCell> | ||
<TableHeaderCell>mvalidtime</TableHeaderCell> | ||
<TableHeaderCell>mperiod</TableHeaderCell> | ||
</template> | ||
|
||
<template #tableCols="{ item }: { item: DataEntry }"> | ||
<TableCell>{{ item.tdescription }}</TableCell> | ||
<TableCell>{{ item.tname }}</TableCell> | ||
<TableCell>{{ item.ttype }}</TableCell> | ||
<TableCell>{{ item.tunit }}</TableCell> | ||
<TableCell>{{ item.tmetadata }}</TableCell> | ||
<TableCell>{{ item.mvalue }}</TableCell> | ||
<TableCell> | ||
<EditedDateCell | ||
:date="item.mvalidtime" | ||
:format="DEFAULT_DATE_TIME_FORMAT" | ||
/> | ||
</TableCell> | ||
<TableCell>{{ item.mperiod }}</TableCell> | ||
</template> | ||
<template #noItems>No webcams have been defined yet</template> | ||
</EditListTable> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import TableCell from '../../../../../components/table/TableCell.vue'; | ||
import TableHeaderCell from '../../../../../components/table/TableHeaderCell.vue'; | ||
import { DEFAULT_DATE_TIME_FORMAT } from '../../../../../config/utils'; | ||
import EditListTable from '../../utils/editList/table/EditListTable.vue'; | ||
import EditedDateCell from '../editedDateCell/EditedDateCell.vue'; | ||
import { DataEntry } from './types'; | ||
defineProps<{ items: DataEntry[] }>(); | ||
</script> |
14 changes: 14 additions & 0 deletions
14
databrowser/src/domain/cellComponents/components/cells/measurementsCell/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
export interface DataEntry { | ||
tdescription?: string; | ||
tname?: string; | ||
ttype?: string; | ||
tunit?: string; | ||
tmetadata?: string; | ||
mvalue?: string; | ||
mvalidtime?: string; | ||
mperiod?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters