Merge branch 'ADBWohneinheit/add-duplicate-view' into 'master'
added new duplicate homeid view See merge request fronk/thetool!1331
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
Vue.component('a-d-b-wohneinheit-duplicate', {
|
||||
//language=Vue
|
||||
template: `
|
||||
<tt-card>
|
||||
<tt-table :data="window['TT_CONFIG']['DUPLICATE_HOMES']" :config="DuplicateHomesTableConfig" excel-export>
|
||||
|
||||
<template v-slot:extref="{ row }">
|
||||
<span class="badge badge-warning">{{ row.extref }}</span>
|
||||
</template>
|
||||
|
||||
<template v-slot:count="{ row }">
|
||||
<span class="badge badge-danger">{{ row.count }}</span>
|
||||
</template>
|
||||
|
||||
<template v-slot:homedetails="{ row }">
|
||||
<div class="duplicate-homes-container">
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>OAID</th>
|
||||
<th>Num</th>
|
||||
<th>Nutzung</th>
|
||||
<th>Rimo Ex State</th>
|
||||
<th>Rimo Op State</th>
|
||||
<th>Erstellt</th>
|
||||
<th>Zuletzt editiert</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="home in row.homeData" :key="home.id" :class="{'bg-light': home.id % 2 === 0}">
|
||||
<td>{{ home.id }}</td>
|
||||
<td>{{ home.oaid || 'N/A' }}</td>
|
||||
<td>{{ home.num }}</td>
|
||||
<td>{{ home.nutzung || 'N/A' }}</td>
|
||||
<td>{{ home.rimo_ex_state || 'N/A' }}</td>
|
||||
<td>{{ home.rimo_op_state || 'N/A' }}</td>
|
||||
<td>{{ formatDate(home.create) }}</td>
|
||||
<td>{{ formatDate(home.edit) }}</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a :href="window['TT_CONFIG']['BASE_URL'] + '/AddressDB/view/?id=' + home.id"
|
||||
class="btn btn-info"
|
||||
target="_blank"
|
||||
title="View">
|
||||
<i class="far fa-eye"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
</tt-table>
|
||||
</tt-card>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
window: window,
|
||||
markedForDeletion: [],
|
||||
DuplicateHomesTableConfig: {
|
||||
key: 'DuplicateHomesTable',
|
||||
tableHeader: 'Doppelte HomeID Liste',
|
||||
defaultPageSize: 10,
|
||||
headers: [
|
||||
{text: 'HomeID', key: 'extref', sortable: true, class: 'text-nowrap', priority: 10},
|
||||
{text: 'Anzahl gleicher HomeIDs', key: 'count', sortable: true, class: 'text-center', priority: 9},
|
||||
{
|
||||
text: 'Home Details',
|
||||
key: 'homeDetails',
|
||||
sortable: false,
|
||||
class: 'w-75',
|
||||
filter: false,
|
||||
priority: 8
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(timestamp) {
|
||||
if (!timestamp) return 'N/A';
|
||||
return this.window.moment.unix(timestamp).format('DD.MM.YYYY HH:mm:ss');
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user