fix(field): repair installation creation and streamline mobile form
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m4s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
DH V2 CI / WEB · typecheck, build (push) Successful in 18s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 1m0s
Production dependency audit / API · production dependencies (push) Successful in 9s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m4s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
DH V2 CI / WEB · typecheck, build (push) Successful in 18s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 1m0s
Production dependency audit / API · production dependencies (push) Successful in 9s
This commit is contained in:
@@ -760,6 +760,7 @@ export class AssetsService {
|
||||
parentId: dto.parentId,
|
||||
operationalAreaId: dto.operationalAreaId,
|
||||
operatorCompanyId: dto.operatorCompanyId,
|
||||
inventoryFamilyId: dto.inventoryFamilyId ?? null,
|
||||
code: dto.code,
|
||||
name: dto.name,
|
||||
commonName: dto.commonName ?? null,
|
||||
|
||||
@@ -36,6 +36,10 @@ export class CreateFieldDiscoveryDto {
|
||||
@IsUUID('4')
|
||||
operatorCompanyId!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUUID('4')
|
||||
inventoryFamilyId?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => typeof value === 'string' && value.trim() ? value.trim() : null)
|
||||
@IsString()
|
||||
|
||||
@@ -295,6 +295,7 @@ export class FieldInventoryService {
|
||||
operationalAreaId: context.areaId,
|
||||
// Compatibility-only creation snapshot. Membership never depends on it.
|
||||
operatorCompanyId: context.companyId,
|
||||
inventoryFamilyId: dto.familyId ?? null,
|
||||
description: dto.description ?? null,
|
||||
discoveryNotes: dto.discoveryNotes ?? null,
|
||||
attributes: dto.attributes,
|
||||
|
||||
@@ -10,8 +10,8 @@ function mountedRepoFile(path: string): string {
|
||||
test('F6.3 Android test cut targets production API and has a distinct installable debug version', () => {
|
||||
const gradle = mountedRepoFile('android-app/app/build.gradle.kts');
|
||||
|
||||
assert.match(gradle, /versionCode = 33/);
|
||||
assert.match(gradle, /versionName = "0\.19\.5"/);
|
||||
assert.match(gradle, /versionCode = 34/);
|
||||
assert.match(gradle, /versionName = "0\.19\.6"/);
|
||||
assert.match(gradle, /https:\/\/dhv2\.korexlabs\.com\/api\/v3\//);
|
||||
assert.match(gradle, /applicationIdSuffix = "\.debug"/);
|
||||
});
|
||||
@@ -26,3 +26,18 @@ test('F5/F6.3 field inventory exposes Other families as reviewable choices to An
|
||||
assert.match(service, /AS "isOther"/);
|
||||
assert.match(service, /isOtherFamily: family\.isOther/);
|
||||
});
|
||||
|
||||
|
||||
test('field inventory persists the validated Tipo de instalación in the initial asset insert', () => {
|
||||
const fieldService = readFileSync(
|
||||
resolve(process.cwd(), 'src/inspection-visits/field-inventory.service.ts'),
|
||||
'utf8',
|
||||
);
|
||||
const assetsService = readFileSync(
|
||||
resolve(process.cwd(), 'src/asset-master/assets.service.ts'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
assert.match(fieldService, /inventoryFamilyId: dto\.familyId \?\? null/);
|
||||
assert.match(assetsService, /inventoryFamilyId: dto\.inventoryFamilyId \?\? null/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user