forked from Kispi/Core
feat(webapp): add server time to admin portal
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
019d0ae566
commit
cd5c7d1569
2 changed files with 85 additions and 72 deletions
|
@ -287,78 +287,6 @@
|
|||
"deleteRule": null,
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "s854d2w72fvyl54",
|
||||
"name": "companies",
|
||||
"type": "auth",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"id": "h5ogbj93",
|
||||
"name": "accountNumber",
|
||||
"type": "text",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cvcgnf4x",
|
||||
"name": "name",
|
||||
"type": "text",
|
||||
"system": false,
|
||||
"required": true,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ujqd3vik",
|
||||
"name": "earlyShiftPayed",
|
||||
"type": "date",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": "",
|
||||
"max": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "t1kakf3f",
|
||||
"name": "lateShiftPayed",
|
||||
"type": "date",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": "",
|
||||
"max": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_eX1Vqqz` ON `companies` (`accountNumber`)"
|
||||
],
|
||||
"listRule": "",
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": "(@request.data.id = null && @request.data.username = null && @request.data.email = null && @request.data.accountNumber = null && @request.data.created = null && @request.data.updated = null && @request.data.name = null && @request.data.emailVisibility = null && @request.data.verified = null) && @request.data.id = @request.auth.id",
|
||||
"deleteRule": null,
|
||||
"options": {
|
||||
"allowEmailAuth": true,
|
||||
"allowOAuth2Auth": true,
|
||||
"allowUsernameAuth": true,
|
||||
"exceptEmailDomains": null,
|
||||
"manageRule": null,
|
||||
"minPasswordLength": 8,
|
||||
"onlyEmailDomains": null,
|
||||
"requireEmail": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "t4gewf713jqhz3i",
|
||||
"name": "settings",
|
||||
|
@ -431,5 +359,77 @@
|
|||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "s854d2w72fvyl54",
|
||||
"name": "companies",
|
||||
"type": "auth",
|
||||
"system": false,
|
||||
"schema": [
|
||||
{
|
||||
"id": "h5ogbj93",
|
||||
"name": "accountNumber",
|
||||
"type": "text",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cvcgnf4x",
|
||||
"name": "name",
|
||||
"type": "text",
|
||||
"system": false,
|
||||
"required": true,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ujqd3vik",
|
||||
"name": "earlyShiftPayed",
|
||||
"type": "date",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": "",
|
||||
"max": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "t1kakf3f",
|
||||
"name": "lateShiftPayed",
|
||||
"type": "date",
|
||||
"system": false,
|
||||
"required": false,
|
||||
"options": {
|
||||
"min": "",
|
||||
"max": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_eX1Vqqz` ON `companies` (`accountNumber`)"
|
||||
],
|
||||
"listRule": "",
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": "(@request.data.username = null && @request.data.email = null && @request.data.accountNumber = null && @request.data.created = null && @request.data.updated = null && @request.data.name = null && @request.data.emailVisibility = null && @request.data.verified = null) && id = @request.auth.id",
|
||||
"deleteRule": null,
|
||||
"options": {
|
||||
"allowEmailAuth": true,
|
||||
"allowOAuth2Auth": true,
|
||||
"allowUsernameAuth": true,
|
||||
"exceptEmailDomains": null,
|
||||
"manageRule": null,
|
||||
"minPasswordLength": 8,
|
||||
"onlyEmailDomains": null,
|
||||
"requireEmail": false
|
||||
}
|
||||
}
|
||||
]
|
|
@ -92,6 +92,16 @@
|
|||
<StarIcon class="h-5 w-5" />
|
||||
Admin Oberfläche
|
||||
</RouterLink>
|
||||
<div
|
||||
v-if="serverTime"
|
||||
class="stats mt-auto bg-base-300"
|
||||
>
|
||||
<div class="stat">
|
||||
<div class="stat-title">Server-Time</div>
|
||||
<div class="stat-value">{{ DateService.toTime(serverTime) }}</div>
|
||||
<div class="stat-desc">{{ DateService.toShortString(serverTime) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AtomCard>
|
||||
<AtomCard class="w-96 border-2 border-error">
|
||||
|
@ -196,6 +206,7 @@ import AtomFactorInput from '../atoms/AtomFactorInput.vue';
|
|||
import OrganismAuthWrapper from '../organisms/OrganismAuthWrapper.vue';
|
||||
import MoleculeImportDataModal from '../molecules/MoleculeImportDataModal.vue';
|
||||
import MoleculeErrorModal from '../molecules/MoleculeErrorModal.vue';
|
||||
import { DateService } from '../../services/date.service';
|
||||
|
||||
const importAccountsModal = ref<InstanceType<typeof MoleculeImportDataModal>>();
|
||||
const importCompaniesModal = ref<InstanceType<typeof MoleculeImportDataModal>>();
|
||||
|
@ -212,6 +223,7 @@ const importPending = ref<boolean>(false);
|
|||
const importDone = ref<boolean>(false);
|
||||
const errorMsg = ref<string>();
|
||||
const createdCompanies = ref<{ name: string, password: string }[]>([]);
|
||||
const serverTime = ref<Date>();
|
||||
|
||||
async function importAccounts(file: File): Promise<void> {
|
||||
const data = await file.text();
|
||||
|
@ -299,6 +311,7 @@ onMounted(async () => {
|
|||
maxWageFactor.value = settings.value.maxWageFactor;
|
||||
incomeTaxRecipient.value = settings.value.incomeTaxRecipient;
|
||||
radioUrl.value = settings.value.radioUrl;
|
||||
serverTime.value = await DateService.getServerTime();
|
||||
});
|
||||
|
||||
async function saveSettings() {
|
||||
|
|
Loading…
Reference in a new issue