Squashed commit of the following:
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 40s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 40s
commit 579f0878e5240dc17db69be1e0b0c0f5af7ef9fe
Author: Arno Kaimbacher <arno.kaimbacher@geosphere.at>
Date: Tue Jun 9 09:25:44 2026 +0200
feat: Refactor error handling in Dataset Edit form and improve validation messages
- Updated error handling in the Dataset Edit form to use a centralized formatError function for displaying validation messages.
- Enhanced user feedback by ensuring that error messages are displayed consistently across various fields.
- Modified the validation rule for arrayContainsTypes to provide clearer error messages for missing main and translated titles/abstracts.
- Introduced a new ValidationService to manage manual construction of validation errors.
- Updated Vite configuration to streamline asset loading and improve performance.
- Adjusted Inertia setup to utilize dynamic imports for page-specific assets.
- Cleaned up unnecessary comments and code in various files for better readability.
commit 5efddc2a58c0e164fef585cc7344c06155dbc2c1
Author: Arno Kaimbacher <arno.kaimbacher@geosphere.at>
Date: Mon Jan 12 17:02:47 2026 +0100
feat: add dataset change detection and form submission composables
- Implemented `useDatasetChangeDetection` for tracking unsaved changes in dataset forms, including comparisons for licenses, basic properties, files, coverage, and more.
- Added `useDatasetFormSubmission` for handling dataset form submissions with validation, success/error handling, and auto-save functionality.
This commit is contained in:
parent
0680879e2f
commit
9368a0dd8d
38 changed files with 5588 additions and 6181 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import ResumptionToken from './ResumptionToken.js';
|
||||
import { createClient, RedisClientType } from 'redis';
|
||||
import InternalServerErrorException from '#app/exceptions/InternalServerException';
|
||||
import { sprintf } from 'sprintf-js';
|
||||
import dayjs from 'dayjs';
|
||||
// import { sprintf } from 'sprintf-js';
|
||||
// import dayjs from 'dayjs';
|
||||
import TokenWorkerContract from './TokenWorkerContract.js';
|
||||
|
||||
export default class TokenWorkerService implements TokenWorkerContract {
|
||||
|
|
@ -98,21 +98,21 @@ export default class TokenWorkerService implements TokenWorkerContract {
|
|||
// return uniqueName;
|
||||
// }
|
||||
|
||||
private async generateUniqueName(): Promise<string> {
|
||||
let fc = 0;
|
||||
const uniqueId = dayjs().unix().toString();
|
||||
let uniqueName: string;
|
||||
let cacheKeyExists: boolean;
|
||||
do {
|
||||
// format values
|
||||
// %s - String
|
||||
// %d - Signed decimal number (negative, zero or positive)
|
||||
// [0-9] (Specifies the minimum width held of to the variable value)
|
||||
uniqueName = sprintf('%s%05d', uniqueId, fc++);
|
||||
cacheKeyExists = await this.has(uniqueName);
|
||||
} while (cacheKeyExists);
|
||||
return uniqueName;
|
||||
}
|
||||
// private async generateUniqueName(): Promise<string> {
|
||||
// let fc = 0;
|
||||
// const uniqueId = dayjs().unix().toString();
|
||||
// let uniqueName: string;
|
||||
// let cacheKeyExists: boolean;
|
||||
// do {
|
||||
// // format values
|
||||
// // %s - String
|
||||
// // %d - Signed decimal number (negative, zero or positive)
|
||||
// // [0-9] (Specifies the minimum width held of to the variable value)
|
||||
// uniqueName = sprintf('%s%05d', uniqueId, fc++);
|
||||
// cacheKeyExists = await this.has(uniqueName);
|
||||
// } while (cacheKeyExists);
|
||||
// return uniqueName;
|
||||
// }
|
||||
|
||||
public async get(key: string): Promise<ResumptionToken | null> {
|
||||
if (!this.cache) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue