feat(web): make active tables sortable
DH V2 CI / API · typecheck, tests, build (push) Successful in 53s
Production dependency audit / API · production dependencies (push) Successful in 19s
Production dependency audit / WEB · production dependencies (push) Successful in 16s
DH V2 CI / WEB · typecheck, build (push) Successful in 1m34s
DH V2 CI / Docker / migrations / production images (push) Successful in 2m49s
DH V2 CI / Promote verified main to deploy (push) Successful in 3s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 7m22s

This commit is contained in:
ChatGPT DH
2026-09-16 19:20:41 -03:00
parent fa6ba7f31e
commit 1beba14c3b
36 changed files with 253 additions and 55 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "dhv2-api",
"version": "0.29.0-16",
"version": "0.29.0-17",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dhv2-api",
"version": "0.29.0-16",
"version": "0.29.0-17",
"license": "UNLICENSED",
"dependencies": {
"@nestjs/common": "^11.0.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dhv2-api",
"version": "0.29.0-16",
"version": "0.29.0-17",
"private": true,
"license": "UNLICENSED",
"scripts": {
+2 -2
View File
@@ -1,2 +1,2 @@
export const API_VERSION = '0.29.0-16';
export const API_PHASE = 'F6.16';
export const API_VERSION = '0.29.0-17';
export const API_PHASE = 'F6.17';
+3 -3
View File
@@ -4,9 +4,9 @@ import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { API_PHASE, API_VERSION } from '../../src/version';
test('health metadata reports the current F6.16 release', () => {
assert.equal(API_PHASE, 'F6.16');
test('health metadata reports the current F6.17 release', () => {
assert.equal(API_PHASE, 'F6.17');
const pkg = JSON.parse(readFileSync(resolve(process.cwd(), 'package.json'), 'utf8')) as { version: string };
assert.equal(API_VERSION, pkg.version);
assert.equal(API_VERSION, '0.29.0-16');
assert.equal(API_VERSION, '0.29.0-17');
});
@@ -13,7 +13,7 @@ test('F6.1 presentation metadata keeps the visible WEB version aligned with pack
const visibleVersion = version.match(/APP_VERSION\s*=\s*'([^']+)'/)?.[1];
assert.equal(visibleVersion, pkg.version);
assert.match(version, /APP_PHASE\s*=\s*'F6\.16/);
assert.match(version, /APP_PHASE\s*=\s*'F6\.17/);
});
test('F6.1 presentation keeps Relevamientos retired from WEB navigation and routes', () => {
@@ -0,0 +1,34 @@
import assert from 'node:assert/strict';
import { readdirSync, readFileSync, statSync } from 'node:fs';
import { resolve } from 'node:path';
import test from 'node:test';
function collectTsx(directory: string): string[] {
return readdirSync(directory).flatMap((name) => {
const path = resolve(directory, name);
return statSync(path).isDirectory() ? collectTsx(path) : name.endsWith('.tsx') ? [path] : [];
});
}
test('F6.17 uses one sortable table component for every active WEB table', () => {
const webRoot = resolve(process.cwd(), '..', 'web-v2', 'src');
const files = collectTsx(webRoot);
const rawTables = files.filter((path) => !path.endsWith('components/SortableTable.tsx') && readFileSync(path, 'utf8').includes('<table'));
assert.deepEqual(rawTables, []);
const sortableFiles = files.filter((path) => readFileSync(path, 'utf8').includes('<SortableTable'));
assert.equal(sortableFiles.length, 24);
const tableCount = sortableFiles.reduce((count, path) => count + (readFileSync(path, 'utf8').match(/<SortableTable/g)?.length ?? 0), 0);
assert.equal(tableCount, 28);
});
test('F6.17 sortable headers toggle direction and compare text, dates and numbers', () => {
const source = readFileSync(resolve(process.cwd(), '..', 'web-v2', 'src', 'components', 'SortableTable.tsx'), 'utf8');
assert.match(source, /aria-sort/);
assert.match(source, /ascending/);
assert.match(source, /descending/);
assert.match(source, /dateValue/);
assert.match(source, /numericPattern/);
assert.match(source, /localeCompare\(right, 'es-AR'/);
assert.match(source, /data-sortable/);
});