Updated TheTool Frontend Framework & Table

This commit is contained in:
Luca Haid
2024-05-08 12:54:26 +00:00
parent 1e57d983b7
commit 58e124a461
46 changed files with 1364 additions and 2535 deletions

View File

@@ -17,12 +17,23 @@ $JSGlobals = ["BASE_URL" => self::getUrl("Domain"),
"DOMAIN_API_URL" => self::getUrl("Domain/api"),
];
$additionalJS = ["plugins/vue/vue.js",
$additionalJS = [
"plugins/vue/vue.js",
"plugins/axios/axios.min.js",
"plugins/vue/tt-components/tt-page-title.js",
"plugins/moment/moment.min.js",
"plugins/daterangepicker/daterangepicker.js",
"plugins/xlsx/xlsx.min.js",
"plugins/vue/tt-components/tt-table.js",
"plugins/vue/tt-components/tt-page-title.js",
"plugins/vue/tt-components/tt-select.js",
"plugins/vue/tt-components/tt-datepicker.js",
"plugins/vue/tt-components/tt-input.js",
"plugins/vue/tt-components/tt-autocomplete.js",
"plugins/vue/tt-components/tt-icon-select.js",
"plugins/vue/tt-components/tt-number-range.js",
];
$additionalCSS = [
"plugins/daterangepicker/daterangepicker.css",
'plugins/vue/tt-components/css/tt-table.css',
];
@@ -32,8 +43,8 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
<!-- start page title -->
<tt-page-title :title="window['TT_CONFIG']['PAGE_TITLE']" :path="window['TT_CONFIG']['PATH']"></tt-page-title>
<tt-table :fetch-url="window['TT_CONFIG']['DOMAIN_API_URL'] + '?do=getDomains'" :table-config="domainsTableConfig"
small ref="table">
<tt-table :fetch-url="window['TT_CONFIG']['DOMAIN_API_URL'] + '?do=getDomains'" :config="domainsTableConfig"
small ssr ref="table">
<template v-slot:top-buttons>
<button type="button" class="btn btn-primary" @click="reloadDomains">
<template v-if="reloadDomainsLoading">
@@ -70,18 +81,6 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
</button>
</template>
<!-- Slot to show if Domain is in Plesk -->
<template v-slot:pleskid="{ row }">
<i v-if="row.pleskId !== null" class="fas fa-check text-success"></i>
<i v-else class="fas fa-times text-danger"></i>
</template>
<!-- Convert all Dates to human readable format -->
<template v-slot:crdate="{ row }">{{ new Date(row.crDate * 1000).toLocaleDateString() }}</template>
<template v-slot:exdate="{ row }">{{ new Date(row.exDate * 1000).toLocaleDateString() }}</template>
<template v-slot:redate="{ row }">{{ new Date(row.reDate * 1000).toLocaleDateString() }}</template>
<template v-slot:update="{ row }">{{ new Date(row.upDate * 1000).toLocaleDateString() }}</template>
<!-- Registrant Admin Tech Billing from domainContacts -->
<template v-slot:registrant="{ row }">
{{ domainContacts[row.registrant] ? domainContacts[row.registrant]["name"] : '' }}
@@ -159,19 +158,25 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
domainsTableConfig() {
const base = {
headers: [
{text: "ID", key: "inwxRoId", "filter": false},
{text: "DNS", key: "inwxRoId", filter: false, sortable: false},
{text: "Domain", key: "domain"},
{text: "Plesk", key: "pleskId", filter: false},
{text: "Created Date", key: "crDate", filter: false},
{text: "Expiration Date", key: "exDate", filter: false},
{text: "Renewal Date", key: "reDate", filter: false},
{text: "Updated Date", key: "upDate", filter: false},
{text: "Transfer Lock", key: "transferLock"},
{text: "Authorization Code", key: "authCode"},
{text: "Registrant ID", key: "registrant"},
{text: "Admin ID", key: "admin"},
{text: "Tech ID", key: "tech"},
{text: "Billing ID", key: "billing"},
{text: "Plesk", key: "pleskId", filter: 'iconSelect', filterOptions: [
{value: 1, text: 'Yes', icon: 'fas fa-check text-success'},
{value: 0, text: 'No', icon: 'fas fa-times text-danger'}
], sortable: false},
{text: "Created Date", key: "crDate", filter: "date"},
{text: "Expiration Date", key: "exDate", filter: "date"},
{text: "Renewal Date", key: "reDate", filter: "date"},
{text: "Updated Date", key: "upDate", filter: "date"},
{text: "Transfer Lock", key: "transferLock", filter: 'iconSelect', filterOptions: [
{value: 1, text: 'Locked', icon: 'fas fa-lock text-danger'},
{value: 0, text: 'Unlocked', icon: 'fas fa-unlock text-success'}
]},
{text: "Authorization Code", key: "authCode", sortable: false},
{text: "Registrant ID", key: "registrant", sortable: false},
{text: "Admin ID", key: "admin", sortable: false},
{text: "Tech ID", key: "tech", sortable: false},
{text: "Billing ID", key: "billing", sortable: false},
{text: "Name Servers", key: "ns"}
],
tableHeader: 'Bestellungen',