@@ -22,10 +22,16 @@ class ConflictDeclarationController extends Controller
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
Inertia::encryptHistory();
|
||||
$response = Inertia::render('conflicts/index', [
|
||||
'declarations' => ConflictDeclaration::query()->visibleTo($this->staffIdentity($request))
|
||||
$declarations = ConflictDeclaration::query()->visibleTo($this->staffIdentity($request))
|
||||
->with(['author:id,name', 'supplier:id,name', 'requisition:id,number', 'successor:id,previous_id'])
|
||||
->latest('id')->paginate(15),
|
||||
->latest('id')->paginate(15);
|
||||
$roots = $declarations->getCollection()->map(fn (ConflictDeclaration $row) => $row->root_id ?? $row->id)->unique();
|
||||
$releasedRoots = app(ConflictReleases::class)->ready()
|
||||
? ConflictRelease::query()->whereIn('root_id', $roots)->orderBy('root_id')->pluck('root_id')->map(fn ($id) => (int) $id)->all()
|
||||
: [];
|
||||
$response = Inertia::render('conflicts/index', [
|
||||
'declarations' => $declarations,
|
||||
'releasedRoots' => $releasedRoots,
|
||||
// These minimal choices allow personal declarations without granting supplier-management access.
|
||||
'suppliers' => Supplier::query()->orderBy('name')->get(['id', 'name']),
|
||||
'requisitions' => Requisition::query()->visibleTo($this->staffIdentity($request))->latest()->get(['id', 'number']),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Enums\PurchasingRole;
|
||||
use App\Http\Requests\ConfirmReceiptRequest;
|
||||
use App\Models\GoodsReceipt;
|
||||
use App\Models\PurchaseOrder;
|
||||
@@ -60,17 +61,19 @@ class GoodsReceiptController extends Controller
|
||||
|
||||
public function order(Request $request, PurchaseOrder $order, ReceiptWorkflow $workflow): Response
|
||||
{
|
||||
$actor = $this->actor($request);
|
||||
Gate::authorize('viewOrder', [GoodsReceipt::class, $order]);
|
||||
Inertia::encryptHistory();
|
||||
|
||||
return Inertia::render('receipts/order', [
|
||||
'financialDocumentsHref' => $actor->hasFunctions([PurchasingRole::Admin, PurchasingRole::Finance]) ? '/facturas?purchase_order_id='.$order->id.'#invoice-documents' : null,
|
||||
'order' => $order->only(['id', 'number', 'issued_by']), 'supplier_name' => $order->snapshot['supplier']['name'],
|
||||
'progress' => $workflow->progress($order),
|
||||
'receipts' => GoodsReceipt::query()->where('purchase_order_id', $order->id)->latest('id')->get(),
|
||||
'warehouses' => Warehouse::query()->orderBy('code')->get(['id', 'code', 'name']),
|
||||
'stockItems' => StockItem::query()->orderBy('code')->get(['id', 'code', 'name', 'unit']),
|
||||
'conversionQaEnabled' => app()->environment('testing') && config('inventory_conversion.qa_enabled') === true,
|
||||
'canConfirm' => $request->user()->can('create', [GoodsReceipt::class, $order]),
|
||||
'canConfirm' => $actor->can('create', [GoodsReceipt::class, $order]),
|
||||
'lotScopes' => Schema::hasTable('inventory_lot_allocations')
|
||||
? app(InventoryLots::class)->activeSetups()->get()->map(fn ($r) => ['stock_item_id' => $r->stock_item_id, 'warehouse_id' => $r->warehouse_id, 'quarantine_on_receipt' => $r->data['quarantine_on_receipt'] ?? true])->values()->all() : [],
|
||||
]);
|
||||
@@ -97,6 +100,8 @@ class GoodsReceiptController extends Controller
|
||||
Inertia::encryptHistory();
|
||||
|
||||
return Inertia::render('receipts/show', [
|
||||
'financialDocumentsHref' => $actor->hasFunctions([PurchasingRole::Admin, PurchasingRole::Finance])
|
||||
? '/facturas?purchase_order_id='.$order->id.'#invoice-documents' : null,
|
||||
'documentsReady' => $ready,
|
||||
'purchaseProcessHref' => $source === null ? null : '/requisicoes/'.$source->id.'/processo',
|
||||
'canAddDocuments' => $ready && $documents->canAdd($actor, $receipt),
|
||||
|
||||
@@ -12,9 +12,10 @@ final class OperationalOrdersController extends Controller
|
||||
{
|
||||
public function index(Request $request, OperationalOrders $orders, ?Requisition $requisition = null): Response
|
||||
{
|
||||
$request->validate(['page' => 'nullable|integer|min:1|max:1000000']);
|
||||
$data = $request->validate(['page' => 'nullable|integer|min:1|max:1000000', 'order_id' => 'nullable|integer|min:1']);
|
||||
Inertia::encryptHistory();
|
||||
$response = Inertia::render('requisitions/operational-orders', $orders->workspace($this->staffIdentity($request), $requisition))->toResponse($request);
|
||||
$selected = $requisition === null && isset($data['order_id']) ? (int) $data['order_id'] : null;
|
||||
$response = Inertia::render('requisitions/operational-orders', $orders->workspace($this->staffIdentity($request), $requisition, $selected))->toResponse($request);
|
||||
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
|
||||
|
||||
return $response;
|
||||
|
||||
@@ -16,6 +16,7 @@ use App\Services\RequisitionApprovalLevels;
|
||||
use App\Services\RequisitionCategories;
|
||||
use App\Services\RequisitionExpiry;
|
||||
use App\Services\UrgentQuotationBasis;
|
||||
use App\Services\UrgentRequisitionReviews;
|
||||
use App\Services\WorkContext;
|
||||
use App\Services\WorkflowTasks;
|
||||
use Brick\Math\BigDecimal;
|
||||
@@ -48,6 +49,7 @@ class OrganizationConfigurationController extends Controller
|
||||
'companyDetailsReady' => Schema::hasColumn('tenants', 'company_details'),
|
||||
'approvalLevelsReady' => app(RequisitionApprovalLevels::class)->ready(),
|
||||
'expiryReady' => app(RequisitionExpiry::class)->ready(),
|
||||
'urgentReviewsReady' => app(UrgentRequisitionReviews::class)->ready(),
|
||||
'requisitionCategoryOptions' => app(RequisitionCategories::class)->available() ? RequisitionCategories::LABELS : [],
|
||||
'approvalLevels' => Tenant::query()->findOrFail($actor->tenant_id)->requisition_approval_policy,
|
||||
'companyDetails' => Tenant::query()->findOrFail($actor->tenant_id)->company_details,
|
||||
|
||||
@@ -13,6 +13,8 @@ use App\Models\Supplier;
|
||||
use App\Models\User;
|
||||
use App\Models\Warehouse;
|
||||
use App\Services\AgreementOrderLimits;
|
||||
use App\Services\CapitalRegister;
|
||||
use App\Services\OperationalOrders;
|
||||
use App\Services\OrganizationAccess;
|
||||
use App\Services\SavedProcurementSearches;
|
||||
use App\Services\SupplyPlanning;
|
||||
@@ -56,8 +58,12 @@ class ProcurementSearchController extends Controller
|
||||
$warehouseRequestSearchAvailable = config('procurement_search.warehouse_requests_metadata_enabled') === true
|
||||
&& $warehouseSelectors !== null && Schema::hasTable('warehouse_requests')
|
||||
&& $actor->hasFunctions(['admin', 'warehouse_request_read', 'warehouse_request_prepare', 'warehouse_request_review', 'warehouse_request_deliver']);
|
||||
$capitalQuery = app(CapitalRegister::class)->searchQuery($actor);
|
||||
$operationalQuery = app(OperationalOrders::class)->searchQuery($actor);
|
||||
$request->validate(['capital_page' => 'nullable|integer|min:1|max:1000000']);
|
||||
$request->validate(['operational_orders_page' => 'nullable|integer|min:1|max:1000000']);
|
||||
$request->validate(['equipment_page' => 'nullable|integer|min:1|max:1000000', 'stock_page' => 'nullable|integer|min:1|max:1000000', 'warehouses_page' => 'nullable|integer|min:1|max:1000000', 'receipts_page' => 'nullable|integer|min:1|max:1000000']);
|
||||
$groups = DB::transaction(function () use ($actor, $term, $planning, $supplySearchAvailable, $supplySelectors, $warehouseRequestSearchAvailable, $warehouseSelectors) {
|
||||
$groups = DB::transaction(function () use ($actor, $term, $planning, $supplySearchAvailable, $supplySelectors, $warehouseRequestSearchAvailable, $warehouseSelectors, $capitalQuery, $operationalQuery) {
|
||||
if (DB::getDriverName() === 'pgsql' && DB::transactionLevel() === 1) {
|
||||
DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');
|
||||
}
|
||||
@@ -148,6 +154,40 @@ class ProcurementSearchController extends Controller
|
||||
$groups[] = ['key' => 'warehouse_requests', 'title' => 'Requisições internas de armazém', 'records' => $records];
|
||||
}
|
||||
|
||||
if ($capitalQuery !== null) {
|
||||
$capitalQuery->where(function ($query) use ($pattern) {
|
||||
foreach (['code', 'name', 'reference'] as $field) {
|
||||
// Fixed register fields only; literal search text remains bound.
|
||||
$expression = DB::getDriverName() === 'pgsql'
|
||||
? 'LOWER("data"->>\''.$field.'\') LIKE ? ESCAPE \'!\''
|
||||
: "LOWER(json_extract(data, '$.".$field."')) LIKE ? ESCAPE '!'";
|
||||
$query->orWhereRaw($expression, [$pattern]);
|
||||
}
|
||||
});
|
||||
$records = $capitalQuery->latest('id')->paginate(15, ['id', 'record_key', 'version', 'state',
|
||||
'data->code as code', 'data->name as name', 'data->type as register_type'], 'capital_page')->withQueryString()
|
||||
->through(fn ($row) => ['id' => $row->id,
|
||||
'title' => ($row->getAttribute('register_type') === 'asset' ? 'Imobilizado' : 'Projecto').' '.$row->getAttribute('code').' — '.$row->getAttribute('name').' · v'.$row->version,
|
||||
'detail' => $row->state, 'href' => '/projectos-imobilizado?history='.rawurlencode($row->record_key)]);
|
||||
$groups[] = ['key' => 'capital', 'title' => 'Projectos e imobilizado', 'records' => $records];
|
||||
}
|
||||
|
||||
if ($operationalQuery !== null) {
|
||||
$operationalQuery->where(function ($query) use ($pattern) {
|
||||
foreach (['reference', 'utilisation_location', 'description'] as $field) {
|
||||
$expression = DB::getDriverName() === 'pgsql'
|
||||
? 'LOWER("data"->>\''.$field.'\') LIKE ? ESCAPE \'!\''
|
||||
: "LOWER(json_extract(data, '$.".$field."')) LIKE ? ESCAPE '!'";
|
||||
$query->orWhereRaw($expression, [$pattern]);
|
||||
}
|
||||
});
|
||||
$records = $operationalQuery->latest('id')->paginate(15, ['id', 'version', 'state', 'data->reference as reference', 'data->type as order_type'], 'operational_orders_page')->withQueryString()
|
||||
->through(fn ($row) => ['id' => $row->id,
|
||||
'title' => ($row->getAttribute('order_type') === 'production' ? 'Produção' : 'Manutenção').' '.$row->getAttribute('reference').' · v'.$row->version,
|
||||
'detail' => $row->state, 'href' => '/ordens-operacionais?order_id='.$row->id.'#op-order-'.$row->id]);
|
||||
$groups[] = ['key' => 'operational_orders', 'title' => 'Ordens de produção e manutenção', 'records' => $records];
|
||||
}
|
||||
|
||||
return $groups;
|
||||
});
|
||||
Inertia::encryptHistory();
|
||||
@@ -156,6 +196,8 @@ class ProcurementSearchController extends Controller
|
||||
'invoiceSearchAvailable' => config('procurement_search.finance_metadata_enabled') === true && $actor->hasFunctions([PurchasingRole::Admin, PurchasingRole::Finance]),
|
||||
'supplySearchAvailable' => $supplySearchAvailable,
|
||||
'warehouseRequestSearchAvailable' => $warehouseRequestSearchAvailable,
|
||||
'capitalSearchAvailable' => $capitalQuery !== null,
|
||||
'operationalOrderSearchAvailable' => $operationalQuery !== null,
|
||||
])->toResponse($request);
|
||||
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Inertia\Inertia;
|
||||
use Inertia\Response;
|
||||
use Symfony\Component\HttpFoundation\Response as HttpResponse;
|
||||
|
||||
class PurchaseController extends Controller
|
||||
{
|
||||
@@ -190,8 +191,12 @@ class PurchaseController extends Controller
|
||||
$actor = $this->access($request);
|
||||
PurchaseOrder::query()->visibleTo($actor)->findOrFail($order->id);
|
||||
$origins = app(OrderPartsAccess::class)->origins($order);
|
||||
Inertia::encryptHistory();
|
||||
|
||||
return Inertia::render('purchases/show', [
|
||||
'financialDocumentsHref' => $actor->hasFunctions([PurchasingRole::Admin, PurchasingRole::Finance]) ? '/facturas?purchase_order_id='.$order->id.'#invoice-documents' : null,
|
||||
'relatedProcesses' => Requisition::query()->visibleTo($actor)->whereIn('id', $origins)->orderBy('id')->get(['id', 'number'])
|
||||
->map(fn ($source) => ['id' => $source->id, 'number' => $source->number, 'href' => '/requisicoes/'.$source->id.'/processo']),
|
||||
'snapshotComplete' => $order->hasCompleteDocumentSnapshot(),
|
||||
'order' => $order->load('items'),
|
||||
'orderPartsSources' => $order->snapshot['order_parts']['frames'] ?? [],
|
||||
@@ -205,12 +210,16 @@ class PurchaseController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function print(Request $request, PurchaseOrder $order): View
|
||||
public function print(Request $request, PurchaseOrder $order): View|HttpResponse
|
||||
{
|
||||
$actor = $this->access($request);
|
||||
PurchaseOrder::query()->visibleTo($actor)->findOrFail($order->id);
|
||||
app(OrderPartsAccess::class)->origins($order);
|
||||
|
||||
if ($request->header('X-Inertia')) {
|
||||
return Inertia::location(route('orders.print', $order, false));
|
||||
}
|
||||
|
||||
return view('purchases.print', ['order' => $order->load('items'), 'snapshot' => $order->snapshot,
|
||||
'snapshotComplete' => $order->hasCompleteDocumentSnapshot(),
|
||||
'operationalState' => app(OrderCancellationWorkflow::class)->state($order)]);
|
||||
|
||||
@@ -90,7 +90,7 @@ class SupplierEvaluationController extends Controller
|
||||
$responses = $responsesReady ? SupplierResponse::query()->where('supplier_evaluation_id', $id)->orderBy('id')->get() : collect();
|
||||
$responseHistory = $responsesReady ? AuditLog::query()->where('action', 'like', 'supplier_response.%')->where('after->supplier_evaluation_id', $id)->latest('id')->paginate(10, ['id', 'action', 'user_id', 'after', 'created_at'], 'responses_history_page')->withQueryString() : null;
|
||||
$history = AuditLog::query()->where('action', 'like', 'supplier_evaluation.%')->where('after->evaluation_id', $id)->latest('id')->paginate(10, ['id', 'action', 'user_id', 'after', 'created_at'], 'history_page')->withQueryString();
|
||||
$peopleIds = collect($evaluation->contributors)->merge($history->pluck('user_id'))->merge($measures->flatMap(fn (SupplierImprovement $m) => $m->contributors))->merge($measures->pluck('reviewed_by'))->merge($measureHistory?->pluck('user_id') ?? []);
|
||||
$peopleIds = collect($evaluation->contributors)->push($evaluation->reviewed_by)->merge($history->pluck('user_id'))->merge($measures->flatMap(fn (SupplierImprovement $m) => $m->contributors))->merge($measures->pluck('reviewed_by'))->merge($measureHistory?->pluck('user_id') ?? []);
|
||||
$peopleIds = $peopleIds->merge($responses->flatMap(fn (SupplierResponse $r) => $r->contributors))->merge($responses->pluck('reviewed_by'))->merge($responseHistory?->pluck('user_id') ?? []);
|
||||
$people = User::query()->where('tenant_id', $actor->tenant_id)->whereIn('id', $peopleIds)->pluck('name', 'id');
|
||||
$writable = $improvementWorkflow->canParticipate($actor, $evaluation);
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\StockItem;
|
||||
use App\Models\User;
|
||||
use App\Models\Warehouse;
|
||||
use App\Services\WarehouseAvailability;
|
||||
use App\Services\WarehouseReservations;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Validation\Rule;
|
||||
@@ -32,7 +33,7 @@ class WarehouseAvailabilityController extends Controller
|
||||
$query->where(fn ($q) => $q->whereLike('code', '%'.$filters['search'].'%')->orWhereLike('name', '%'.$filters['search'].'%'));
|
||||
}
|
||||
$page = $warehouse === null ? null : $query->orderBy('code')->paginate(25)->withQueryString()->through(fn ($item) => $availability->row($item, $warehouse, $planning));
|
||||
$response = Inertia::render('stock/availability', ['filters' => $filters, 'planningVisible' => $planning, 'rows' => $page,
|
||||
$response = Inertia::render('stock/availability', ['filters' => $filters, 'planningVisible' => $planning, 'reservationsAvailable' => app(WarehouseReservations::class)->ready(), 'rows' => $page,
|
||||
'warehouse' => $warehouse?->only(['id', 'code', 'name']), 'checkedAt' => now()->toIso8601String(),
|
||||
'warehouses' => Warehouse::query()->orderBy('code')->get(['id', 'code', 'name'])])->toResponse($request);
|
||||
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\CapitalRegister;
|
||||
use App\Services\OperationalOrders;
|
||||
use App\Services\OrganizationAccess;
|
||||
use App\Services\PrivateAuditAccess;
|
||||
use App\Services\SupplierPayables;
|
||||
use App\Services\WorkContext;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -66,7 +68,8 @@ class HandleInertiaRequests extends Middleware
|
||||
'payablesAvailable' => $actor !== null && app(SupplierPayables::class)->can($actor, 'view'),
|
||||
'orderCancellationAvailable' => $actor !== null && (bool) config('order_cancellation.enabled') && Schema::hasTable('order_cancellations'),
|
||||
'operationalOrdersAvailable' => $actor !== null && app(OperationalOrders::class)->ready(),
|
||||
'privateAuditAvailable' => $actor !== null && app(\App\Services\PrivateAuditAccess::class)->ready(),
|
||||
'privateAuditAvailable' => $actor !== null && app(PrivateAuditAccess::class)->ready(),
|
||||
'capitalRegisterAvailable' => $actor !== null && app(CapitalRegister::class)->searchQuery($actor) !== null,
|
||||
'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -45,6 +45,20 @@ final class CapitalRegister
|
||||
->when($actor->departmentScoped(), fn ($q) => $q->where('data->department_id', $actor->department_id));
|
||||
}
|
||||
|
||||
/** Native read scope for cross-module metadata search; never locks or changes the register.
|
||||
* @return Builder<SupplyRecord>|null
|
||||
*/
|
||||
public function searchQuery(User $actor): ?Builder
|
||||
{
|
||||
if (! $this->ready() || auth()->id() !== $actor->id || $actor->tenant_id === null
|
||||
|| app(OrganizationAccess::class)->maintenanceOnly($actor)
|
||||
|| ! $actor->hasFunctions(['admin', 'warehouse', 'procurement', 'finance', 'department_head'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->visible($actor)->where('tenant_id', $actor->tenant_id);
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
public function workspace(User $actor, ?string $historyKey = null): array
|
||||
{
|
||||
|
||||
@@ -7,8 +7,27 @@ use App\Models\SupplyRecord;
|
||||
/** Documentary transcription of a specific supplied edition, never a consolidated/current tariff claim. */
|
||||
final class ImportLegalReferenceDrafts
|
||||
{
|
||||
public const VAT_EDITION_SHA256 = '0c13f4b03dadea7f2dfe30694650078fa7b9de00ef84cb47389422d23a5271cd';
|
||||
|
||||
public const EDITION_SHA256 = 'a0110696253715567af39c159a21bacfebc32f944fa43a4efd18070d36959e50';
|
||||
|
||||
public const ICE_EDITION_SHA256 = '9b10862f60ed87ec42d4f42f3cae42e17580eb761e4b7673bd8d8225691c4de4';
|
||||
|
||||
/** Law 7/2025, second supplement, page 2180-(22); only the explicitly tabulated 2026/2027 positions. */
|
||||
private const ICE_ROWS = [
|
||||
['8702.10.10', 'Veículos para dez ou mais pessoas, diesel, tipo Jeep, tracção às quatro rodas, novos ou usados até 7 anos', '20'],
|
||||
['8702.10.20', 'Veículos para dez ou mais pessoas, diesel, tipo Jeep, tracção às quatro rodas, usados há mais de 7 anos', '25'],
|
||||
['8702.20.00', 'Veículos para dez ou mais pessoas, propulsão simultânea diesel e eléctrica', '20'],
|
||||
['8702.30.00', 'Veículos para dez ou mais pessoas, propulsão simultânea por ignição por faísca e eléctrica', '20'],
|
||||
['8702.40.10', 'Autocarros unicamente eléctricos para transporte de 40 ou mais pessoas', '0'],
|
||||
['8702.40.20', 'Outros veículos unicamente eléctricos para transporte de dez ou mais pessoas', '0'],
|
||||
['8702.90.10', 'Outros veículos para dez ou mais pessoas, tracção às quatro rodas, novos ou usados até 7 anos', '20'],
|
||||
['8702.90.20', 'Outros veículos para dez ou mais pessoas, tracção às quatro rodas, usados há mais de 7 anos', '25'],
|
||||
['8702.90.90', 'Outros veículos para transporte de dez ou mais pessoas', '0'],
|
||||
['8703.80.10', 'Automóveis de passageiros unicamente eléctricos, bateria até 62 kWh', '5'],
|
||||
['8703.80.20', 'Outros automóveis de passageiros unicamente eléctricos', '15'],
|
||||
];
|
||||
|
||||
/** Annex to Law 8/2025, pages 2180-(4) to (7): exact codes and general rates, never preferential eligibility. */
|
||||
private const ROWS = [
|
||||
['3506.91.10', 'Adesivos à base de polímeros ou borracha', '20'],
|
||||
@@ -64,6 +83,16 @@ final class ImportLegalReferenceDrafts
|
||||
/** @return list<array<string,mixed>> */
|
||||
public function forSource(SupplyRecord $source): array
|
||||
{
|
||||
if ($source->kind === 'import_legal_source' && ($source->snapshot['evidence']['sha256'] ?? null) === self::VAT_EDITION_SHA256) {
|
||||
app(ImportEvidence::class)->bytes($source);
|
||||
|
||||
return $this->vatDrafts($source);
|
||||
}
|
||||
if ($source->kind === 'import_legal_source' && ($source->snapshot['evidence']['sha256'] ?? null) === self::ICE_EDITION_SHA256) {
|
||||
app(ImportEvidence::class)->bytes($source);
|
||||
|
||||
return $this->iceDrafts($source);
|
||||
}
|
||||
if ($source->kind !== 'import_legal_source' || ($source->snapshot['evidence']['sha256'] ?? null) !== self::EDITION_SHA256) {
|
||||
return [];
|
||||
}
|
||||
@@ -92,4 +121,54 @@ final class ImportLegalReferenceDrafts
|
||||
|
||||
return $drafts;
|
||||
}
|
||||
|
||||
/**
|
||||
* This edition establishes a rate; it supplies neither an item classification nor an import valuation.
|
||||
*
|
||||
* @return list<array<string,mixed>>
|
||||
*/
|
||||
private function vatDrafts(SupplyRecord $source): array
|
||||
{
|
||||
$citation = 'Lei 22/2022, de 28 de Dezembro, artigo 1 (artigo 17, n.º 1, do CIVA), BR I Série 250, página 2238; entrada em vigor em 1 de Janeiro de 2023: artigo 6, página 2239.';
|
||||
|
||||
return [['source_id' => $source->id, 'source_sha256' => self::VAT_EDITION_SHA256,
|
||||
'code' => 'IVA_ART17', 'match_code' => '', 'suggested_code' => '',
|
||||
'label' => 'IVA — taxa normal; completar código e base',
|
||||
'description' => 'IVA — taxa normal do artigo 17; completar código e base',
|
||||
'rate_percent' => '16', 'rate_label' => '16% — base por documentar',
|
||||
'documentary_class' => null, 'title' => 'IVA documental — taxa normal; completar âmbito',
|
||||
'official_reference' => $source->data['official_reference'], 'official_url' => $source->data['official_url'] ?? null,
|
||||
'citation' => $citation, 'valid_from' => '2023-01-01', 'valid_until' => null,
|
||||
'obligations' => 'Esta proposta transcreve apenas a taxa normal do artigo 17, n.º 1, na redacção da Lei 22/2022. Complete expressamente os códigos, incidência, regime, período e base da importação antes de gravar. O artigo 16 do CIVA e as condições de isenção exigem conferência nas respectivas fontes; não usar o preço dos bens como base por inferência. Alterações posteriores, incluindo as Leis 3/2025 e 10/2025, devem ser consideradas no contexto aplicável. Não determina dedutibilidade, taxa reduzida ou outras imposições.',
|
||||
'charges' => [['key' => 'vat_normal_documentary', 'kind' => 'vat', 'label' => 'IVA — taxa normal documental',
|
||||
'method' => 'ad_valorem', 'rate_percent' => '16', 'specific_minor' => null, 'quantity_unit' => null,
|
||||
'basis_reference' => ''],
|
||||
...array_map(fn (array $charge) => ['key' => $charge[0], 'kind' => $charge[1], 'label' => $charge[2],
|
||||
'method' => 'unknown', 'rate_percent' => null, 'specific_minor' => null, 'quantity_unit' => null,
|
||||
'basis_reference' => 'Não determinado por esta transcrição da taxa normal de IVA: conferir a fonte, a incidência, o regime e a base.'],
|
||||
[['duty_pending', 'duty', 'Direitos aduaneiros — por determinar'], ['ice_pending', 'ice', 'ICE — por determinar'], ['other_pending', 'other', 'Outras imposições — por conferir']])]]];
|
||||
}
|
||||
|
||||
/** @return list<array<string,mixed>> */
|
||||
private function iceDrafts(SupplyRecord $source): array
|
||||
{
|
||||
return array_values(array_map(function (array $row) use ($source) {
|
||||
[$code, $description, $rate] = $row;
|
||||
$citation = 'Lei 7/2025, de 29 de Dezembro, artigos 3 e 6 e anexo, BR I Série 248, 2.º suplemento, página 2180-(22), código '.$code.'; coluna 2026 e 2027.';
|
||||
$rateLabel = $rate === '0' ? 'ICE Livre — conforme anexo' : 'ICE '.$rate.'%';
|
||||
|
||||
return ['source_id' => $source->id, 'source_sha256' => self::ICE_EDITION_SHA256,
|
||||
'code' => $code, 'description' => $description, 'rate_percent' => $rate, 'rate_label' => $rateLabel,
|
||||
'documentary_class' => null, 'title' => 'ICE documental — '.$code,
|
||||
'official_reference' => $source->data['official_reference'], 'official_url' => $source->data['official_url'] ?? null,
|
||||
'citation' => $citation, 'valid_from' => '2026-01-01', 'valid_until' => '2027-12-31',
|
||||
'obligations' => 'Conferir a descrição completa, capacidade, propulsão, tracção e idade na página 2180-(22). '.($rate === '0' ? 'O anexo indica Livre para ICE nesta posição; o zero documental não significa isenção dos demais impostos. ' : '').'Este segundo suplemento declara sem efeito a publicação anterior da Lei 7/2025 no primeiro suplemento; não altera por inferência a Lei 8/2025. A proposta cobre apenas o ICE desta posição em 2026 e 2027, sem determinar direitos, IVA, origem preferencial, base ou outras imposições; não combinar fontes nem classificar mercadorias automaticamente.',
|
||||
'charges' => [['key' => 'ice_documentary', 'kind' => 'ice', 'label' => $rateLabel,
|
||||
'method' => 'ad_valorem', 'rate_percent' => $rate, 'specific_minor' => null, 'quantity_unit' => null, 'basis_reference' => $citation],
|
||||
...array_map(fn (array $charge) => ['key' => $charge[0], 'kind' => $charge[1], 'label' => $charge[2],
|
||||
'method' => 'unknown', 'rate_percent' => null, 'specific_minor' => null, 'quantity_unit' => null,
|
||||
'basis_reference' => 'Não determinado por este anexo de ICE: documentar incidência, regime, base e período na fonte aplicável.'],
|
||||
[['duty_pending', 'duty', 'Direitos aduaneiros — por determinar'], ['vat_pending', 'vat', 'IVA — por determinar'], ['other_pending', 'other', 'Outras imposições — por conferir']])]];
|
||||
}, self::ICE_ROWS));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Models\Requisition;
|
||||
use App\Models\RequisitionItem;
|
||||
use App\Models\SupplyRecord;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
@@ -16,6 +17,8 @@ use Illuminate\Validation\ValidationException;
|
||||
/** Documentary production/maintenance orders owned by Compras; no production scheduling or SGF writes. */
|
||||
final class OperationalOrders
|
||||
{
|
||||
private const REGISTRY_READERS = ['admin', 'procurement', 'requester', 'production_order_prepare', 'maintenance_order_prepare'];
|
||||
|
||||
public function ready(): bool
|
||||
{
|
||||
$db = DB::connection();
|
||||
@@ -43,6 +46,26 @@ final class OperationalOrders
|
||||
return app(SupplyPlanning::class)->latest('op_order_policy')->first();
|
||||
}
|
||||
|
||||
/** @return Builder<SupplyRecord> */
|
||||
private function registryOrders(User $actor): Builder
|
||||
{
|
||||
return app(SupplyPlanning::class)->latest('op_order')->where('tenant_id', $actor->tenant_id)
|
||||
->when(! $actor->hasFunctions(['admin', 'procurement']), fn ($q) => $q->where('data->department_id', $actor->department_id));
|
||||
}
|
||||
|
||||
/** Current native registry scope for read-only cross-module search.
|
||||
* @return Builder<SupplyRecord>|null
|
||||
*/
|
||||
public function searchQuery(User $actor): ?Builder
|
||||
{
|
||||
if (! $this->ready() || auth()->id() !== $actor->id || $actor->tenant_id === null
|
||||
|| app(OrganizationAccess::class)->maintenanceOnly($actor) || ! $actor->hasFunctions(self::REGISTRY_READERS)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->registryOrders($actor);
|
||||
}
|
||||
|
||||
/** @return list<string> */
|
||||
private function types(User $actor, ?SupplyRecord $policy): array
|
||||
{
|
||||
@@ -57,15 +80,15 @@ final class OperationalOrders
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
public function workspace(User $actor, ?Requisition $request = null): array
|
||||
public function workspace(User $actor, ?Requisition $request = null, ?int $selectedOrderId = null): array
|
||||
{
|
||||
return DB::transaction(function () use ($actor, $request) {
|
||||
return DB::transaction(function () use ($actor, $request, $selectedOrderId) {
|
||||
$actor = $this->actor($actor);
|
||||
$policy = $this->policy();
|
||||
if ($request !== null) {
|
||||
$request = Requisition::query()->visibleTo($actor)->findOrFail($request->id);
|
||||
} else {
|
||||
abort_unless($actor->hasFunctions(['admin', 'procurement', 'requester', 'production_order_prepare', 'maintenance_order_prepare']), 403);
|
||||
abort_unless($actor->hasFunctions(self::REGISTRY_READERS), 403);
|
||||
}
|
||||
$canLink = $request !== null && $request->status === 'draft' && $request->requester_id === $actor->id
|
||||
&& app(OrganizationAccess::class)->canRequest($actor) && ! app(ConflictGuard::class)->participationBlocked($actor, $request);
|
||||
@@ -75,15 +98,19 @@ final class OperationalOrders
|
||||
$linkedIds[] = $link->data['order_id'];
|
||||
}
|
||||
$allDepartments = $actor->hasFunctions(['admin', 'procurement']);
|
||||
$orders = app(SupplyPlanning::class)->latest('op_order')
|
||||
->when($request !== null && ! $canLink, fn ($q) => $q->whereIn('id', $linkedIds))
|
||||
->when($request !== null, fn ($q) => $q->where('data->department_id', $request->department_id))
|
||||
->when($request === null && ! $allDepartments, fn ($q) => $q->where('data->department_id', $actor->department_id));
|
||||
$orders = $request === null ? $this->registryOrders($actor)
|
||||
: app(SupplyPlanning::class)->latest('op_order')->where('data->department_id', $request->department_id)
|
||||
->when(! $canLink, fn ($q) => $q->whereIn('id', $linkedIds));
|
||||
if ($selectedOrderId !== null) {
|
||||
(clone $orders)->findOrFail($selectedOrderId);
|
||||
$orders->whereKey($selectedOrderId);
|
||||
}
|
||||
|
||||
return ['actorId' => $actor->id, 'tenantId' => $actor->tenant_id, 'policy' => $policy,
|
||||
'canConfigure' => $actor->hasFunctions(['admin']), 'allowedTypes' => $this->types($actor, $policy),
|
||||
'departments' => Department::query()->when(! $allDepartments, fn ($q) => $q->whereKey($actor->department_id))->orderBy('name')->get(['id', 'name']),
|
||||
'orders' => $orders->latest('id')->paginate(15)->withQueryString(),
|
||||
'orders' => $orders->latest('id')->paginate(15, ['*'], 'page', $selectedOrderId === null ? null : 1)->withQueryString(),
|
||||
'selectedOrderId' => $selectedOrderId,
|
||||
'requisition' => $request?->only(['id', 'number', 'status']),
|
||||
'items' => $request?->items()->get(['id', 'description']) ?? [],
|
||||
'links' => $links, 'canLink' => $canLink,
|
||||
|
||||
@@ -139,14 +139,23 @@ final class PrivateAuditSourceReader
|
||||
'configuration' => ['organization.', 'company.', 'audit.private_'],
|
||||
'finance' => ['budget.', 'invoice.', 'payment.', 'expense.', 'payables.', 'ledger.', 'sgf_invoice.'],
|
||||
'stock' => ['stock.', 'receipt.', 'warehouse.', 'inventory.', 'warehouse_request.', 'replenishment.', 'supply.policy.', 'supply.reservation.', 'supply.delivery.', 'supply.issue.', 'supply.alternative.', 'supply.history.', 'supply.suggestion.'],
|
||||
'purchasing' => ['requisition.', 'approval.', 'quotation.', 'award.', 'purchase_order.', 'opening.', 'qualification.', 'admission.', 'recommendation.', 'capital.', 'conflict.', 'equipment.', 'investment.', 'urgent.', 'op_order.', 'op_order_policy.', 'op_order_link.', 'import.', 'supply.agreement.', 'supply.contract.', 'supply.import.'],
|
||||
'purchasing' => ['requisition.', 'approval.', 'quotation.', 'award.', 'purchase_order.', 'opening.', 'qualification.', 'admission.', 'recommendation.', 'capital.', 'conflict.', 'equipment.', 'investment.', 'urgent.', 'op_order.', 'op_order_policy.', 'op_order_link.', 'import.', 'supply.agreement.', 'supply.contract.', 'supply.import.', 'supplier_evaluation.', 'supplier_improvement.', 'supplier_response.'],
|
||||
default => throw new LogicException('Família de eventos desconhecida.'),
|
||||
};
|
||||
if ($family === 'purchasing') {
|
||||
$prefixes = [...$prefixes, 'planning.', 'purchase_control.', 'cancellation.', 'order_cancellation.', 'order_cancellation_policy.'];
|
||||
} elseif ($family === 'stock') {
|
||||
$prefixes[] = 'warehouse_return.';
|
||||
}
|
||||
$columns = ['id', 'tenant_id', 'user_id', 'requisition_id', 'action', 'created_at'];
|
||||
$query = DB::table('audit_logs')->where('tenant_id', $actor->tenant_id)->where(function ($events) use ($prefixes) {
|
||||
$query = DB::table('audit_logs')->where('tenant_id', $actor->tenant_id)->where(function ($events) use ($prefixes, $family) {
|
||||
foreach ($prefixes as $prefix) {
|
||||
$events->orWhereRaw('substr(action, 1, ?) = ?', [strlen($prefix), $prefix]);
|
||||
}
|
||||
if ($family === 'purchasing') {
|
||||
// Supplier bank events remain outside this approved purchasing export.
|
||||
$events->orWhereIn('action', ['supplier.created', 'supplier.updated', 'supplier.reviewed', 'supplier.document_uploaded', 'supplier.document_downloaded']);
|
||||
}
|
||||
});
|
||||
$rows = function () use ($query, $columns, $family): Generator {
|
||||
foreach ($query->select([...$columns, ...($family === 'configuration' ? ['before', 'after'] : [])])->orderBy('id')->lazy(100) as $event) {
|
||||
|
||||
@@ -184,7 +184,7 @@ class PurchaseWorkflow
|
||||
...app(AgreementOrderLimits::class)->freeze($user, $quote, $requisition, $lines, $agreementBindings),
|
||||
...($quote->exchange_basis === null ? [] : ['exchange_basis' => $quote->exchange_basis, 'reference_amounts' => app(QuotationExchange::class)->amounts($quote)]),
|
||||
...($catalogueSources === [] ? [] : ['catalogue_sources' => $catalogueSources]),
|
||||
'development_only' => true, 'budget_checked' => false,
|
||||
'development_only' => true,
|
||||
'budget_control' => app(BudgetWorkflow::class)->record($user, $requisition, 'commit', $award->total_minor, $award->subtotal_minor, $quote),
|
||||
'investment_rules' => $award->investment_snapshot,
|
||||
'equipment_requests' => $requisition->items()->where('purchase_type', 'equipment')->get()->map(fn ($line) => $line->only(['id', 'description', 'production_area']))->all(),
|
||||
@@ -206,6 +206,8 @@ class PurchaseWorkflow
|
||||
...($urgentDocument === [] ? [] : ['urgent_quotation_basis' => $urgentDocument]),
|
||||
'equipment_context' => $requisition->items()->whereNotNull('equipment_id')->get()->map(fn ($line) => ['requisition_item_id' => $line->id, 'equipment' => Equipment::query()->findOrFail($line->equipment_id)->toArray(), 'spare_part' => SparePart::query()->findOrFail($line->spare_part_id)->toArray(), 'downtime_started_at' => $line->downtime_started_at])->all(),
|
||||
];
|
||||
// Preserve the result returned by the existing budget authority at issuance.
|
||||
$snapshot['budget_checked'] = $snapshot['budget_control'] !== null;
|
||||
$order = PurchaseOrder::query()->create([
|
||||
'tenant_id' => $user->tenant_id, 'requisition_id' => $requisition->id, 'purchase_award_id' => $award->id,
|
||||
'supplier_id' => $supplier->id, 'issued_by' => $user->id, 'currency' => $quote->currency,
|
||||
|
||||
@@ -32,11 +32,15 @@ class WarehouseAvailability
|
||||
}
|
||||
}
|
||||
|
||||
$reservations = app(WarehouseReservations::class);
|
||||
$committed = $reservations->ready() ? $reservations->committed($item->id, $warehouse->id) : null;
|
||||
$free = $usable === null || $committed === null ? null : $usable - $committed;
|
||||
|
||||
return ['id' => $item->id, 'code' => $item->code, 'name' => $item->name, 'unit' => $item->unit,
|
||||
'physical_milli' => $physical['quantity'], 'usable_milli' => $usable, 'blocked_milli' => $lots === null || ! $lots['reconciled'] ? null : $lots['blocked_milli'],
|
||||
'lot_control' => $lots !== null, 'reconciled' => $lots === null || $lots['reconciled'], 'planned_milli' => $needs,
|
||||
'minimum_milli' => $minimum, 'at_minimum' => $usable !== null && $minimum !== null && $usable - app(WarehouseReservations::class)->committed($item->id, $warehouse->id) <= $minimum,
|
||||
'physical_commitment_milli' => app(WarehouseReservations::class)->ready() ? app(WarehouseReservations::class)->committed($item->id, $warehouse->id) : null,
|
||||
'free_milli' => $usable === null ? null : $usable - app(WarehouseReservations::class)->committed($item->id, $warehouse->id), 'ledger_version' => $physical['version']];
|
||||
'minimum_milli' => $minimum, 'at_minimum' => $free !== null && $minimum !== null && $free <= $minimum,
|
||||
'physical_commitment_milli' => $committed,
|
||||
'free_milli' => $free, 'ledger_version' => $physical['version']];
|
||||
}
|
||||
}
|
||||
|
||||
+18
-2
@@ -1,8 +1,24 @@
|
||||
# Desenvolvimento do SGC
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputa??es,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
29/11/2026 — continuação para candidata operacional: interface integral466testes/92ficheiros aprovada. Conferidos por bytes68ficheiros dos dois runtimes congelados e184entradas da compilação99b07243. Inventariados27adaptadores e5migraçõesQA na proposta compras-operational-candidate-proposal.json, sem promoção, instalação ou activação executadas. Pedida decisão específica de promoção de contratos/artefactos porque a autorização anterior exclui publicação/instalação operacional. C2: confirmação antiga cancelada e preparação descartada com original preservado; nova tentativa, já comURL/identidade conferidos e observação conjunta, voltou a ser interrompida pela ferramenta no diálogo nativo. Não confirmar a decisão por outra interface nem declarar aprovação; frente visual parada, bases/roles removidos. Corrigidas24notas próprias e4rótulos documentais com acentos corrompidos, escritaUTF-8 e round-trip conferidos. A promoção aguarda resposta; aplicação integral não declarada concluída.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissção,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
29/11/2026 — cancelamento C2 legado: a revisão nativa encontrou o ramo de documento incompleto sem estado/formulário operacional, apesar da autorização existente. Reposto o componente comum apenas com o DTO autorizado, preservando desconhecidos. Frontend18/2ficheiros, tipos/análise/build aprovados, manifesto99b07243/184entradas. Edge demonstrou pedido com fundamento/suporte, autor sem decisão e origem suspensa; Finanças independente recusou fundamento vazio e seleccionou Aprovar. Ao preencher motivo/accionar decisão, a ferramenta interrompeu o turno por não conseguir confirmar o URL; confirmação/aprovação final não observadas. Não repetir uma acção incerta. A conferência final não passou por faltar cancelamento aprovado. Base/roleQA removidos; separador/possível diálogo não puderam ser fechados. Retomar em nova composição isolada e confirmar decisão/conservação/móvel/impressão. Provas issued-order-cancellation.json/product-review-20261122.json; aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — comparação de cotações: acesso directo à adjudicação preservado e etapas/documentos relacionados reunidos num grupo fechado por defeito, sem alterar destinos ou condição do mínimo urgente. Desktop com duas colunas e390×526 com uma; sete destinos legíveis e ligação de origem abriuREQ-2026-000003/Aprovada/v3. Frontend14/3ficheiros, tipos/análise/build aprovados, manifesto4b9768dc/184entradas. O helper de teste usa o tipo do componente inicial do Inertia, resolvendo duas advertências da união redundante. Base/role/separadorQA e ferramentas removidos, original preservado. Provas product-review-20261122.json/menu-code-contract.json/requisition-history.json. Sem gravações, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — mínimo urgente demonstrado no navegador: política sintética20unidades/stock livre0/natureza e utilização explícitas, recusa sem fundamento, conferência20 gravada e persistida após recarga. Comparação passou3→1propostas, mantendo2avaliações independentes. Desktop/390×526 legíveis; conferência readonly confirmou1evidência/1auditoria e13conjuntos financeiros/stock/autoridades intactos. Corrigida a fixture que concluía só a primeira aprovação: circuito nativo agora completa etapas elegíveis e verifica estado/autoridade antes de abrir, preservando os controlos do produto. Primeira base descartada sem conferência; a verificação final dessa tentativa falhou como esperado e o diagnósticoJSON do helper foi corrigido. Manifesto0aa249f4/184entradas, bases/roles/separadoresQA removidos. Orientações de contratos/acordos/reposição/importação contextualizadas, frontend13/1ficheiro, tipos/análise/build aprovados e quatro áreas conferidas a390px; importações sem atalho genérico de contratos. Provas requisition-history.json/rq01-account-assignment-qa.json/product-review-20261122.json. Não activa políticas reais nem encerra a aplicação.
|
||||
|
||||
29/11/2026 — recuperado controlo nativo e fechada a janelaQA antiga. A390×526/100%, avaliação com cinco atalhos em coluna e destinos medidas/contraditório abaixo do cabeçalho; pesquisa contratos mostra só Fornecimento habitual, fecha o menu e permite passar de acordos a contratos. Rótulo de criação, referência QA-VISUAL-CONTRACT e ligações espaçadas legíveis. Prazo urgente sintético mostra início04:12:15/expiração04:17:15 e explicação do prazo reduzido, sem executar comandos. Mesmo manifesto419da033, sem recompilação para esta prova; base/roleQA e janela própria removidos, originais preservados. Provas product-review-20261122.json/supplier-evaluations-http.json/menu-code-contract.json/requisition-history.json. Não é ensaio da redução de cotações pelo stock mínimo nem aceitação integral.
|
||||
|
||||
28/11/2026 — auditoria e relações entre módulos: eventos de planeamento, controlo/cancelamento da compra e devolução ao armazém acompanham os registos já exportados, nas famílias Compras/stock correspondentes. Regressão verifica inclusão, separação entre famílias e leitura sem alterar fontes; ZIP real contém planeamento/cancelamento em Compras e devolução em stock, com manifesto/hashes conferidos. SQLite18/558 antes das últimas asserçõesZIP e delta1/421 sobreposto; PG final18/564, PHPStan0/Pint/sintaxe aprovados, base/roleQA removidos. Complementa o delta de fornecedores, sem repetir concessões, activar instalação ou declarar aceitação integral. Prova audit-export-scope-proposal.json.
|
||||
|
||||
28/11/2026 — auditoria de fornecedores: corrigida omissão dos eventos de avaliação, medidas e contraditório no pacote de Compras, mais cinco acções explícitas do cadastro/documentos. Bancos, acções futuras desconhecidas, outras famílias e empresas continuam excluídos; projecção dos eventos conserva apenas metadados. ZIP real de teste inclui os três eventos de seguimento, exclui evento bancário/payload e mantém manifesto/hashes/idempotência. SQLite conjunto17/536 e deltaZIP1/415 sobreposto; PG final17/542, PHPStan0/Pint/sintaxe/diff aprovados, base/role removidos. Fixture estrangeira corrigida com autor próprio/payload obrigatório, sem alterar restrições. Prova audit-export-scope-proposal.json. Sem nova descarga nativa, activação ou aceitação integral.
|
||||
|
||||
28/11/2026 — conflitos e preparação visual: revisão anterior a390×526/100% confirmou levantamento pela direcção, lista com um impedimento activo e outro levantado, deslocação confinada à tabela e histórico do outro conflito bloqueante; originais e13conjuntos financeiros/stock/autoridade conservados. Corrigida a preparaçãoQA que omitia os três ícones públicos: arranque seguinte verificouHTTP200 e SHA256 exacto dos originais. Nesta sessão, as ferramentas abriram a390px no login, mas cliques/leitura nativos expiraram; atalhos de avaliação e contratos mantiveram a prova desktop/janela502px, sem nova prova390 nesse momento. Base/roleQA removidos; fecho da janela própria não confirmado nessa passagem. Provas product-review-20261122.json/requisition-history.json. Recuperação posterior registada em29/11; aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputações,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissão,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
|
||||
28/11/2026 — recuperação conjunta de auditoria privada demonstrada: pg_dump/pg_restore para outra base e identidade não privilegiada,138tabelas/colunas/linhas iguais; ficheiros restaurados de cópia separada com a árvore original indisponível. ZIP das quatro famílias e original sintético preservam bytes/hash; repetição sem efeitos e revogação actual recusada. Bases77d3a97ec523/a546c3b9d7b8,roles,cluster e raiz próprios removidos. Comando --private-audit-recovery --integrated-schema --frozen-runtime no runner existente; prova audit-export-scope-proposal.json. Sem instalação ou alteração operacional.
|
||||
|
||||
|
||||
@@ -1,8 +1,66 @@
|
||||
# Matriz reconciliada do SGC — 03/11/2026
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputa??es,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
29/11/2026 — continuação para candidata operacional: interface integral466testes/92ficheiros aprovada. Conferidos por bytes68ficheiros dos dois runtimes congelados e184entradas da compilação99b07243. Inventariados27adaptadores e5migraçõesQA na proposta compras-operational-candidate-proposal.json, sem promoção, instalação ou activação executadas. Pedida decisão específica de promoção de contratos/artefactos porque a autorização anterior exclui publicação/instalação operacional. C2: confirmação antiga cancelada e preparação descartada com original preservado; nova tentativa, já comURL/identidade conferidos e observação conjunta, voltou a ser interrompida pela ferramenta no diálogo nativo. Não confirmar a decisão por outra interface nem declarar aprovação; frente visual parada, bases/roles removidos. Corrigidas24notas próprias e4rótulos documentais com acentos corrompidos, escritaUTF-8 e round-trip conferidos. A promoção aguarda resposta; aplicação integral não declarada concluída.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissção,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
29/11/2026 — cancelamento C2 legado: a revisão nativa encontrou o ramo de documento incompleto sem estado/formulário operacional, apesar da autorização existente. Reposto o componente comum apenas com o DTO autorizado, preservando desconhecidos. Frontend18/2ficheiros, tipos/análise/build aprovados, manifesto99b07243/184entradas. Edge demonstrou pedido com fundamento/suporte, autor sem decisão e origem suspensa; Finanças independente recusou fundamento vazio e seleccionou Aprovar. Ao preencher motivo/accionar decisão, a ferramenta interrompeu o turno por não conseguir confirmar o URL; confirmação/aprovação final não observadas. Não repetir uma acção incerta. A conferência final não passou por faltar cancelamento aprovado. Base/roleQA removidos; separador/possível diálogo não puderam ser fechados. Retomar em nova composição isolada e confirmar decisão/conservação/móvel/impressão. Provas issued-order-cancellation.json/product-review-20261122.json; aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — comparação de cotações: acesso directo à adjudicação preservado e etapas/documentos relacionados reunidos num grupo fechado por defeito, sem alterar destinos ou condição do mínimo urgente. Desktop com duas colunas e390×526 com uma; sete destinos legíveis e ligação de origem abriuREQ-2026-000003/Aprovada/v3. Frontend14/3ficheiros, tipos/análise/build aprovados, manifesto4b9768dc/184entradas. O helper de teste usa o tipo do componente inicial do Inertia, resolvendo duas advertências da união redundante. Base/role/separadorQA e ferramentas removidos, original preservado. Provas product-review-20261122.json/menu-code-contract.json/requisition-history.json. Sem gravações, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — mínimo urgente demonstrado no navegador: política sintética20unidades/stock livre0/natureza e utilização explícitas, recusa sem fundamento, conferência20 gravada e persistida após recarga. Comparação passou3→1propostas, mantendo2avaliações independentes. Desktop/390×526 legíveis; conferência readonly confirmou1evidência/1auditoria e13conjuntos financeiros/stock/autoridades intactos. Corrigida a fixture que concluía só a primeira aprovação: circuito nativo agora completa etapas elegíveis e verifica estado/autoridade antes de abrir, preservando os controlos do produto. Primeira base descartada sem conferência; a verificação final dessa tentativa falhou como esperado e o diagnósticoJSON do helper foi corrigido. Manifesto0aa249f4/184entradas, bases/roles/separadoresQA removidos. Orientações de contratos/acordos/reposição/importação contextualizadas, frontend13/1ficheiro, tipos/análise/build aprovados e quatro áreas conferidas a390px; importações sem atalho genérico de contratos. Provas requisition-history.json/rq01-account-assignment-qa.json/product-review-20261122.json. Não activa políticas reais nem encerra a aplicação.
|
||||
|
||||
29/11/2026 — recuperado controlo nativo e fechada a janelaQA antiga. A390×526/100%, avaliação com cinco atalhos em coluna e destinos medidas/contraditório abaixo do cabeçalho; pesquisa contratos mostra só Fornecimento habitual, fecha o menu e permite passar de acordos a contratos. Rótulo de criação, referência QA-VISUAL-CONTRACT e ligações espaçadas legíveis. Prazo urgente sintético mostra início04:12:15/expiração04:17:15 e explicação do prazo reduzido, sem executar comandos. Mesmo manifesto419da033, sem recompilação para esta prova; base/roleQA e janela própria removidos, originais preservados. Provas product-review-20261122.json/supplier-evaluations-http.json/menu-code-contract.json/requisition-history.json. Não é ensaio da redução de cotações pelo stock mínimo nem aceitação integral.
|
||||
|
||||
28/11/2026 — auditoria e relações entre módulos: eventos de planeamento, controlo/cancelamento da compra e devolução ao armazém acompanham os registos já exportados, nas famílias Compras/stock correspondentes. Regressão verifica inclusão, separação entre famílias e leitura sem alterar fontes; ZIP real contém planeamento/cancelamento em Compras e devolução em stock, com manifesto/hashes conferidos. SQLite18/558 antes das últimas asserçõesZIP e delta1/421 sobreposto; PG final18/564, PHPStan0/Pint/sintaxe aprovados, base/roleQA removidos. Complementa o delta de fornecedores, sem repetir concessões, activar instalação ou declarar aceitação integral. Prova audit-export-scope-proposal.json.
|
||||
|
||||
28/11/2026 — auditoria de fornecedores: corrigida omissão dos eventos de avaliação, medidas e contraditório no pacote de Compras, mais cinco acções explícitas do cadastro/documentos. Bancos, acções futuras desconhecidas, outras famílias e empresas continuam excluídos; projecção dos eventos conserva apenas metadados. ZIP real de teste inclui os três eventos de seguimento, exclui evento bancário/payload e mantém manifesto/hashes/idempotência. SQLite conjunto17/536 e deltaZIP1/415 sobreposto; PG final17/542, PHPStan0/Pint/sintaxe/diff aprovados, base/role removidos. Fixture estrangeira corrigida com autor próprio/payload obrigatório, sem alterar restrições. Prova audit-export-scope-proposal.json. Sem nova descarga nativa, activação ou aceitação integral.
|
||||
|
||||
28/11/2026 — conflitos e preparação visual: revisão anterior a390×526/100% confirmou levantamento pela direcção, lista com um impedimento activo e outro levantado, deslocação confinada à tabela e histórico do outro conflito bloqueante; originais e13conjuntos financeiros/stock/autoridade conservados. Corrigida a preparaçãoQA que omitia os três ícones públicos: arranque seguinte verificouHTTP200 e SHA256 exacto dos originais. Nesta sessão, as ferramentas abriram a390px no login, mas cliques/leitura nativos expiraram; atalhos de avaliação e contratos mantiveram a prova desktop/janela502px, sem nova prova390 nesse momento. Base/roleQA removidos; fecho da janela própria não confirmado nessa passagem. Provas product-review-20261122.json/requisition-history.json. Recuperação posterior registada em29/11; aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — conflitos: Edge desktop demonstrou que Administração sem competência própria não recebe levantamento; direcção sintética com função própria exige fundamento, levanta apenas declaração1 e conserva declaração2 bloqueante. Corrigida lista que ainda negava levantamento: texto segue a decisão expressa e cada conflito declarado distingue impedimento activo/levantado, sem mudar o original; consulta de raízes limitada à página/âmbito visível. SQLite/PG47/473cada, frontend11/2ficheiros, tipos/PHPStan0/Pint/análise/build aprovados. Primeiras duas asserções novas falharam por falta de atribuição na fixture após activar perfis; corrigida apenas a preparação sintética e mantida recusa403a identidade sem atribuição. Revisão final e recarga confirmam os dois estados; conferência readonly conserva dois originais e13frames financeiros/stock/autoridade, uma decisão/auditoria, outro impedimento continua activo. Comparação de snapshot é canónica quanto à ordem das chavesJSON; frames do utilizador comparam identidade/empresa/departamento/papel, não tokens normais de autenticação. Manifesto419da033/184entradas; bases/rolesQA removidos e separador original preservado. Provas requisition-history.json/product-review-20261122.json; sem nova revisão móvel/impressão, concessões reais, activação ou aceitação integral.
|
||||
|
||||
28/11/2026 — navegação adaptada recuperada por alternativa independente: nova janelaQA redimensionada pelo menu do sistema, sem alterar limites das janelas originais. Captura final502×998px da janela (viewportCSS não medido); atalhos da avaliação em coluna, salto ao contraditório com título abaixo do cabeçalho, conteúdo sem corte lateral observado, menu adaptado/pesquisa contratos e passagem a Fornecimento/Contratos com rótulos/referência/ligações legíveis. Janela própria fechada, originais confirmadas no inventário e base/roleQA removidos. Build observado c4d051cc; não declarar nova prova390px. Frontend conjunto final458/92ficheiros aprovado, sem somar às execuções anteriores; correcção do foco legal restringe procura aos controlos inválidos, evitando seleccionar agrupamentos. Compilação privada final11185f53/184entradas sem faltas, fixada no runner; esta compilação posterior teve apenas esse delta de foco, sem repetir revisão nativa dos menus. Provas product-review-20261122.json/supplier-evaluations-http.json/menu-code-contract.json. Aplicação integral e aceitação empresarial continuam abertas.
|
||||
|
||||
28/11/2026 — navegação na avaliação de fornecedores: atalhos recolhidos por defeito para evidências, última decisão quando existente, conferência/rectificação conforme capacidade, histórico fora do relatório, medidas e contraditório. Destinos focáveis reutilizam o afastamento do cabeçalho; navegação oculta na impressão. Frontend23/4ficheiros, tipos/análise/build aprovados. Edge desktop confirmou cinco destinos presentes e saltos às medidas/contraditório com títulos visíveis; sem gravações. Manifestoc4d051cc/184entradas, base/roleQA removidos e separador original preservado. Revisão móvel continua por confirmar: comando de programação disponível no menu, mas submenu fora da geometria principal; clique na captura separada expirou e alternativa pelo teclado não abriu ferramentas. Frente parada sem nova prova móvel/impressão. Provas supplier-evaluations-http.json/product-review-20261122.json; aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — medida de melhoria nativa: três sessões sintéticas distintas demonstraram criaçãoMM-2v1 porQA reviewer, responsávelQA head/prazo6/12/2026 pelos segmentos nativos da data, progressov2 e pedidov3/A aguardar conferência. Sem evidência, pedido desactivado; responsável não vê confirmar o próprio encerramento. Finanças independente fundamenta e encerra v4; resultado/evidência/revisor/estado persistem após recarga, AVF-1 conserva Aprovada/v3 no ecrã e histórico total7inclui medida anterior. Fecho sem aviso residual, base/roleQA removidos e separador original preservado. Mesmo build872018a8; sem nova lógica de produto, nova prova móvel/impressão, operação financeira, envio externo ou aceitação integral. Prova supplier-evaluations-http.json. O preenchimento observado por segmentos resolve esta introdução de data; não equivale a sucesso do selector do sistema anteriormente indisponível.
|
||||
|
||||
28/11/2026 — conclusão do contraditório: em nova base descartável, CTR-2v2 preparado/submetido pelos serviços nativos; Finanças independente selecciona acolhimento e fundamento no navegador. Recusa sem seguimento visível e valores conservados; seguimento/referência fictícios preenchidos e conclusãov3 persistida após recarga, com autoria/histórico6consultáveis. AVF-1 permanece Aprovada/v3 no ecrã. Ensaio separado do ciclo anterior de devolução/correcção, não alegar uma única execução contínua. Sintaxe/Pint da fixture aprovados; mesmo build872018a8, sem recompilação ou nova lógica de produto. Base/roleQA removidos e separador original preservado; sem envio externo, nova prova móvel/impressão ou aceitação integral. Provas supplier-responses-http.json/supplier-evaluations-http.json.
|
||||
|
||||
28/11/2026 — fornecimento e contratos: vigência/default/acordos/contratos mantêm a entrada existente Fornecimento habitual apenas quando autorizada; pesquisa reconhece acordos/contratos/vigência sem novas concessões. Corrigidos rótulo Novo contrato com vários artigos, título pela referência documental escapada e ligações encostadas, agora num grupo com quebra e espaçamento. Frontend39/4ficheiros, tipos/análise dirigida/build aprovados. Edge desktop confirmou destaque na vigência, pesquisa com uma opção, regresso ao cadastro e apresentação final. A emulação móvel não abriu em duas tentativas, sem progresso; esta frente foi parada e não há nova prova móvel. Manifesto final872018a8/184entradas; bases/rolesQA removidos, separador original/piloto/SGF preservados. Provas product-review-20261122.json/menu-code-contract.json; sem aceitação integral.
|
||||
|
||||
28/11/2026 — contraditório: Edge desktop demonstrou criaçãoCTR-2v1, recusa sem data conservando argumentos, data28/11/2026 introduzida pelos segmentos nativos, gravaçãov2 e submissãov3. Finanças independente devolve com fundamentov4; autoria consulta motivo, corrige referênciav5 e resubmetev6/Em análise. Avaliação aprovadaAVF-1v3 preservada no ecrã; histórico total9inclui o contraditório anterior. Fecho sem aviso residual; sem conclusão final, envio externo, revisão móvel ou impressão nesta passagem. Frontend conjunto448/92ficheiros aprovado, sobreposto aos testes dirigidos, sem somar. Manifesto084b3d39; base/roleQA removidos e separador original preservado. Provas supplier-responses-http.json/supplier-evaluations-http.json. Aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — IVA documental: proposta da taxa normal16% a partir do exemplar partilhado da Lei22/2022, artigo17/BR250p2238, início1/1/2023 pelo artigo6p2239. Fonte verificada por bytes/hash; códigos e base ficam vazios para preenchimento expresso e outras três imposições indeterminadas. Nenhuma fórmula de base ou consolidação jurídica automática. SQLite4/231, PG congelado12/289, frontend final28/3ficheiros, tipos/PHPStan0/Pint/análise dirigida/build aprovados. Edge desktop confirmou fonte/taxa/data/campos em falta e recusa por código obrigatório; corrigido campo ocultado pelo cabeçalho fixo, com regressão e repetição nativa mostrando-o ao centro. Preparação descartada, sem gravação/publicação; gravação sintética e recusa de base ausente verificadas apenas nos testes backend. Manifesto084b3d39/184entradas, bases/rolesQA removidos e separador original preservado. Provas import-legal-readiness-qa.json/import-legal-amounts-qa.json; sem nova vista móvel, activação ou aceitação integral. Primeira invocação PG seleccionou suiteFX por faltar o modo exterior; não conta como provaIVA, substituída pela execução dirigida correcta.
|
||||
|
||||
29/11/2026 — preparação da avaliação de fornecedores: evidências e fundamento da decisão passam a recuperar por utilizador/empresa/contexto/versão, com comparação canónica e protecção comum. Frontend21/4ficheiros, tipos/análise/build469de423/184entradas aprovados. Edge desktop conferiu rascunho pela autoria e decisão por Finanças independente: aviso/continuar, navegação completa/Voltar com texto recuperado, nova saída protegida antes de escrever e limpeza sem aviso residual. Nenhuma gravação/submissão/aprovação/devolução executada no navegador. Tentativa inicial foi recarga causada por preenchimento automático do endereço anterior; sessão intacta, destino exacto confirmado antes da repetição válida. Base/roleQA removidos e separador original preservado. Provas supplier-evaluations-http.json e requisition-history.json. Não atribuir nova revisão móvel ou concluir aplicação integral.
|
||||
|
||||
29/11/2026 — seguimento da avaliação: uma medida sintética encerrada e um contraditório concluído criados pelos serviços nativos com responsáveis/revisão independente; comparação antes/depois conservou o original aprovado. Edge desktop/390×526 confirmou estado, versões3, resultado/evidência, origem dos argumentos, decisão e seguimento. Impressão3folhas com medida e contraditório inteiros, cancelada; a introdução da secção do contraditório ficou na folha anterior ao registo. Não equivale a ensaio completo de edição/devolução pelo navegador nem comunicação externa. Mesmo manifestob695d6e2, sem recompilação/repetição de testes por não alterar produto. Base/roleQA removidos, original/piloto/SGF preservados. Provas supplier-evaluations-http.json e supplier-responses-http.json; restantes percursos e aceitação integral continuam abertos.
|
||||
|
||||
29/11/2026 — avaliação de fornecedores: relatório identifica revisor preservado, mesmo ao consultar página vazia do histórico, e apresenta data legível. Edge desktop/390×526 confirmou autoria, critérios, período e revisão independente; impressão final2folhas conserva revisor/fundamento/data juntos na segunda, cancelada. Corrigido período do exemplo QA para incluir a ordem sintética e incluída guarda de regressão. SQLite18/266 antes do ajuste de savepoints e delta1/28; PG final18/268, frontend17/3ficheiros e regressão final2/1 sobreposta, tipos/PHPStan0/Pint/análise/build aprovados. Primeiro PG17/18 revelou teste histórico que não recuperava da recusa SQL esperada; savepoints preservam os controlos e a revisão aprovada. Manifestob695d6e2/184entradas; todas as bases/roles/separadoresQA removidos, original/piloto/SGF preservados. Prova supplier-evaluations-http.json. Medidas/contraditório não vazios e restantes percursos continuam abertos; sem aceitação integral.
|
||||
|
||||
29/11/2026 — importação documental: quatro originais sintéticos e ligação ao suporte bancário conferidos em Edge; a390×526 título, estado e prazo legíveis. Corrigido contexto genérico do menu em dossiê/suporte/acompanhamento/custos, com destaque Importações apenas para entrada já autorizada. Frontend22/4ficheiros, tipos/análise/contrato149/6/build4857fa1b/184entradas aprovados. Edge desktop confirmou Compras/Importações e gravou revisão bancária v2, conservando v1, uma factura exigida, prazo28/11 e entrega por indicar; recarga e fecho sem falso aviso. Sem novo upload/selectores/JUE/operação bancária; móvel observado antes da correcção exclusivamente de menu. Bases/rolesQA removidos, original/piloto/SGF preservados. Provas import-bank-support-qa.json, import-dossier-qa.json e product-review-20261122.json. Nove requisitos reconciliados em rq01-import-reconciliation.json, conservando estados históricos e limites. Aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — recepção: ligação directa às facturas da ordem no detalhe, apenas para Administração/Finanças actuais. SQLite3/95, PostgreSQL6/201, frontend11/3ficheiros, tipos/PHPStan0/análise/build aprovados; consulta conserva fontes financeiras/stock e outra empresa recebe404. Percurso nativo final480verificações/53POST/sete perfis, projecto próprio incluído, 100MZN=40+60/saldo0/stock1/diário0; não somar às execuções anteriores. Edge desktop abriu da recepção1 as facturas filtradas da ordem2 no bloco de documentos. Impressão anterior da recepção numa folha,1recebida/1aceite/0rejeitada, cancelada. Cadastro próprio usa protecção comum: frontend19/3ficheiros e Edge confirmaram aviso, continuar com valor conservado, limpeza e saída sem aviso residual. Manifestoe9472d5f/184entradas; base/roleQA removidos e separador original preservado. Provas receipt-print.json, rq01-account-assignment-qa.json e capital-register-qa.json. Sem revisão móvel adicional desta ronda, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — delta de integração e apresentação em QA: projecto próprio até pagamentos exercitado por HTTP nativo (464 verificações/53POST/sete perfis, 100 MZN=40+60, saldo0, stock1, diário0); ligações contextuais respeitam os leitores existentes. Controlo orçamental preservado na emissão e impressão completa corrigidos, PG dirigido6/181 e SQLite3/75. Navegação financeira frontend22/5ficheiros e base legal35/4 aprovadas; tipos/PHPStan/análise/build aprovados. Edge desktop/móvel financeiro, impressão completa2páginas/legado3(canceladas); base legal desktop confirmou atalhos/editor, e gravação decimal anterior v2/recarga/móvel confirmada. Detalhes e limites nas provas capital-register-qa.json, rq01-account-assignment-qa.json, import-legal-amounts-qa.json e product-review-20261122.json. QA removido; piloto/SGF preservados. Não encerra cobertura integral, acervo fiscal ou aceitação empresarial.
|
||||
|
||||
28/11/2026 — parametrização organizada por atalhos condicionais para secções presentes e focáveis; título antes da localização administrativa, destinos abaixo do cabeçalho fixo e acesso directo aos prazos/perfis de revisão de urgências conforme disponibilidade. Subpáginas conservam Administração apenas quando o menu de origem já é autorizado. Políticas usam a protecção comum: regresso pelo histórico recuperou o motivo e bloqueou saída sem novo input; continuar a editar preservou-o, limpar permitiu fechar. Recarga completa confirmada limpa o histórico por comportamento explícito do Inertia instalado; não confundir com Voltar/Avançar. Frontend57/10ficheiros, organizaçãoSQLite25/267, tipos/PHPStan0/análise dirigida/contrato149entradas/6papéis/build aprovados. Edge desktop/390×526 conferiu atalhos e prazos30/5minutos sintéticos, sem gravar políticas. Manifestod6c7d85e/183entradas sem faltas; QA removido, piloto/SGF e separador original preservados. Provas product-review-20261122.json e requisition-history.json. Sem aceitação integral.
|
||||
|
||||
28/11/2026 — consulta e stock: oito filtros de leitura separados das preparações de negócio, sem retirar a protecção de criação/revisão de fornecedores. Frontend23/5ficheiros, tipos/análise dirigida/build e consulta Edge de ARM-TEST com QA sem falso aviso passaram. Corrigida também mensagem histórica sobre reservas: explica a capacidade actual; indisponibilidade conserva compromisso/saldo livre desconhecidos e não gera sinal de mínimo por inferência. SQLite3/59, PostgreSQL56/921 e concorrência, frontend7/2ficheiros, tipos/PHPStan0/análise/build e leitura nativa aprovados. Provas requisition-history.json e warehouse-availability.json; manifesto1beb4e59/183entradas sem faltas, QA removido e piloto/SGF preservados. Formato geral assinalou ficheiros históricos fora do recorte; apenas os afectados foram formatados. Aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — pesquisa de ordens operacionais: referência, local e descrição consultáveis no âmbito nativo da empresa/departamento e competências actuais; resultados mínimos ligam directamente ao registo seleccionado, mesmo fora da primeira página. Âmbito recolhido para dar prioridade ao formulário móvel. SQLite15/500, PostgreSQL9/231, frontend31/4ficheiros, tipos/check/Pint/PHPStan0 aprovados. Edge desktop e390×526 confirmou pesquisa, resultado Registada, abertura da origem18 e Voltar com critérios preservados; ligação de regresso ao cadastro verificada em backend/frontend, sem clique nativo. Buildf0e64c67/183entradas; base/role e separador próprios removidos, original preservado. Prova operational_order_search_delta_20261128 em rq01-account-assignment-qa.json. Sem activação, efeitos financeiros/stock ou alteração SGF; aplicação integral permanece aberta.
|
||||
|
||||
28/11/2026 — consulta transversal: projectos/imobilizado próprios pesquisáveis, com versão actual, âmbito nativo e ligação ao histórico; menu/destaque disponíveis apenas com capacidade e competência. Resultados antes das áreas sem resultados recolhidas. SQLite/PG20/495, frontend39/4ficheiros, tipos/PHPStan0/check/Pint/contrato e percurso Edge desktop/390×526 aprovados. Corrigidos falsos avisos de consulta e re-marcação de formulário limpo, com regressões34/5ficheiros e verificação nativa de protecção, cancelamento, limpeza e nova consulta. Provas capital-register-qa.json/requisition-history.json. Build2c08ae1d/183entradas fixado; QA removido, piloto/SGF preservados; aplicação integral aberta.
|
||||
|
||||
28/11/2026 — propostas ICE:11posições do anexo2026/2027 da Lei7/2025 no2.ºsuplemento oficial, fonteAT exactaSHA9b10862f...; período e substituição expressa da publicação anterior identificados. Sem combinação automática com direitos/IVA, sem publicação ou activação. SQLite e PG finais11/260 cada; frontend24/3ficheiros e tipos/PHPStan0/check/Pint/build aprovados. Edge gravou preparação v1/5%/8703.80.10 com período até31/12/2027, conferida no móvel. Prova import-legal-readiness-qa.json; timeout inicial PG registado, bases/separadores QA removidos e piloto/SGF preservados. Demais posições/fontes/impostos e aceitação integral continuam próprios.
|
||||
|
||||
28/11/2026 — relatórios: atalhos internos só para secções presentes na consulta autorizada, mantendo filtros, CSV e origens. Onze testes/6ficheiros, tipos/check/build; Edge desktop e390×526 demonstrou salto sem título encoberto após correcção/regressão. Candidata6af5a1fe/183entradas fixada no runner, QA removido e piloto/SGF preservados. Evidência report_navigation_delta_20261128 em product-review-20261122.json; não constitui encerramento integral dos relatórios.
|
||||
|
||||
28/11/2026 — organização e navegação: pesquisa directa sobre entradas autorizadas, sinónimos/acentos, tarefas primeiro e secções de fornecimento/importação. Painel liga às listas existentes e separa decisões pessoais dos pendentes visíveis; mensagens vazias contextualizadas. Frontend37/4ficheiros, tipos/check/build e contrato149entradas/6papéis aprovados. Edge confirmou teclado/Escape, importações, menu390×526, ausência de exportação privada sem autoridade e três pendentes/zero decisões pessoais nos conjuntos correctos. Prova product-review-20261122.json; detalhe menus-benchmark-20261029.md. QA removido, piloto/SGF preservados. Cobertura transversal e aceitação integral continuam abertas.
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputações,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissão,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
|
||||
28/11/2026 — recuperação conjunta de auditoria privada demonstrada: pg_dump/pg_restore para outra base e identidade não privilegiada,138tabelas/colunas/linhas iguais; ficheiros restaurados de cópia separada com a árvore original indisponível. ZIP das quatro famílias e original sintético preservam bytes/hash; repetição sem efeitos e revogação actual recusada. Bases77d3a97ec523/a546c3b9d7b8,roles,cluster e raiz próprios removidos. Comando --private-audit-recovery --integrated-schema --frozen-runtime no runner existente; prova audit-export-scope-proposal.json. Sem instalação ou alteração operacional.
|
||||
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# Menus de Compras — primeira aplicação do benchmark
|
||||
|
||||
29/11/2026 — comparação de cotações: acesso directo à adjudicação preservado e etapas/documentos relacionados reunidos num grupo fechado por defeito, sem alterar destinos ou condição do mínimo urgente. Desktop com duas colunas e390×526 com uma; sete destinos legíveis e ligação de origem abriuREQ-2026-000003/Aprovada/v3. Frontend14/3ficheiros, tipos/análise/build aprovados, manifesto4b9768dc/184entradas. O helper de teste usa o tipo do componente inicial do Inertia, resolvendo duas advertências da união redundante. Base/role/separadorQA e ferramentas removidos, original preservado. Provas product-review-20261122.json/menu-code-contract.json/requisition-history.json. Sem gravações, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — mínimo urgente demonstrado no navegador: política sintética20unidades/stock livre0/natureza e utilização explícitas, recusa sem fundamento, conferência20 gravada e persistida após recarga. Comparação passou3→1propostas, mantendo2avaliações independentes. Desktop/390×526 legíveis; conferência readonly confirmou1evidência/1auditoria e13conjuntos financeiros/stock/autoridades intactos. Corrigida a fixture que concluía só a primeira aprovação: circuito nativo agora completa etapas elegíveis e verifica estado/autoridade antes de abrir, preservando os controlos do produto. Primeira base descartada sem conferência; a verificação final dessa tentativa falhou como esperado e o diagnósticoJSON do helper foi corrigido. Manifesto0aa249f4/184entradas, bases/roles/separadoresQA removidos. Orientações de contratos/acordos/reposição/importação contextualizadas, frontend13/1ficheiro, tipos/análise/build aprovados e quatro áreas conferidas a390px; importações sem atalho genérico de contratos. Provas requisition-history.json/rq01-account-assignment-qa.json/product-review-20261122.json. Não activa políticas reais nem encerra a aplicação.
|
||||
|
||||
29/11/2026 — importação documental: quatro originais sintéticos e ligação ao suporte bancário conferidos em Edge; a390×526 título, estado e prazo legíveis. Corrigido contexto genérico do menu em dossiê/suporte/acompanhamento/custos, com destaque Importações apenas para entrada já autorizada. Frontend22/4ficheiros, tipos/análise/contrato149/6/build4857fa1b/184entradas aprovados. Edge desktop confirmou Compras/Importações e gravou revisão bancária v2, conservando v1, uma factura exigida, prazo28/11 e entrega por indicar; recarga e fecho sem falso aviso. Sem novo upload/selectores/JUE/operação bancária; móvel observado antes da correcção exclusivamente de menu. Bases/rolesQA removidos, original/piloto/SGF preservados. Provas import-bank-support-qa.json, import-dossier-qa.json e product-review-20261122.json. Nove requisitos reconciliados em rq01-import-reconciliation.json, conservando estados históricos e limites. Aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — navegação contextual: projectos ligam às origens congeladas de compras/recepção; ordem e recepção apresentam facturas apenas aos leitores financeiros existentes. Destino da factura abre documentos registados, preservando filtro por ordem, com registo separado. Base legal oferece atalhos para secções presentes; Preparar nova versão copia a preparação e conduz ao editor abaixo do cabeçalho. Subrotas aduaneiras destacam Importações apenas se a entrada já estiver autorizada. Desktop conferido; percurso financeiro também a390×526. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Sem novas permissões, instalação ou aceitação integral.
|
||||
|
||||
28/11/2026 — parametrização organizada por atalhos condicionais para secções presentes e focáveis; título antes da localização administrativa, destinos abaixo do cabeçalho fixo e acesso directo aos prazos/perfis de revisão de urgências conforme disponibilidade. Subpáginas conservam Administração apenas quando o menu de origem já é autorizado. Políticas usam a protecção comum: regresso pelo histórico recuperou o motivo e bloqueou saída sem novo input; continuar a editar preservou-o, limpar permitiu fechar. Recarga completa confirmada limpa o histórico por comportamento explícito do Inertia instalado; não confundir com Voltar/Avançar. Frontend57/10ficheiros, organizaçãoSQLite25/267, tipos/PHPStan0/análise dirigida/contrato149entradas/6papéis/build aprovados. Edge desktop/390×526 conferiu atalhos e prazos30/5minutos sintéticos, sem gravar políticas. Manifestod6c7d85e/183entradas sem faltas; QA removido, piloto/SGF e separador original preservados. Provas product-review-20261122.json e requisition-history.json. Sem aceitação integral.
|
||||
|
||||
28/11/2026 — pesquisa de ordens operacionais: referência, local e descrição consultáveis no âmbito nativo da empresa/departamento e competências actuais; resultados mínimos ligam directamente ao registo seleccionado, mesmo fora da primeira página. Âmbito recolhido para dar prioridade ao formulário móvel. SQLite15/500, PostgreSQL9/231, frontend31/4ficheiros, tipos/check/Pint/PHPStan0 aprovados. Edge desktop e390×526 confirmou pesquisa, resultado Registada, abertura da origem18 e Voltar com critérios preservados; ligação de regresso ao cadastro verificada em backend/frontend, sem clique nativo. Buildf0e64c67/183entradas; base/role e separador próprios removidos, original preservado. Prova operational_order_search_delta_20261128 em rq01-account-assignment-qa.json. Sem activação, efeitos financeiros/stock ou alteração SGF; aplicação integral permanece aberta.
|
||||
|
||||
## Incremento de 28/11/2026 — pesquisa e acesso ao trabalho
|
||||
|
||||
O cadastro próprio de projectos/imobilizado tem agora entrada em Armazém e activos, condicionada à capacidade e à leitura nativa, incluindo destaque no histórico. A pesquisa de processos encontra código, nome e referência da versão actual e abre o histórico de origem. Áreas com resultados aparecem primeiro; as áreas sem resultados permanecem consultáveis numa lista expansível. A validação nativa encontrou e corrigiu avisos falsos dos filtros e a re-marcação de uma edição já limpa; outra preparação continua protegida. Provas e âmbito em capital-register-qa.json/requisition-history.json; candidata final2c08ae1d, sem instalação ou mudança de acessos reais.
|
||||
|
||||
Também foram acrescentados atalhos internos nos relatórios, apenas para os blocos efectivamente fornecidos pela consulta autorizada: acompanhamento, obrigações, entregas, despesa confirmada, contratos e filtros/requisições. Conservam os parâmetros da página, o CSV e as ligações de origem. Onze testes em seis ficheiros, tipos/check/build e revisão Edge desktop/390×526 aprovados. O primeiro salto encobria o título pelo cabeçalho fixo; afastamento corrigido, regressão acrescentada e nova conferência nativa demonstrou título/campos visíveis em ambos os tamanhos. Candidata final `sgc-report-navigation-final-qa-20261128`, manifesto `6af5a1fe7f8a6e1fedcc6fcde931886ccbe9a53fbcb0e95b307a21250a6fc377`, 183 entradas sem faltas, fixada no runner. Sem novos cálculos ou direitos; ambiente descartável removido.
|
||||
|
||||
A pesquisa abre resultados directos no desktop sem fazer desaparecer os grupos do menu. Aceita acentos, palavras em qualquer ordem e termos como importação/alfândega, produção/oficina e liquidação. Pesquisa exclusivamente as entradas já autorizadas pelo perfil, contexto e opções existentes; ligações de página completa conservam esse comportamento. Escape limpa e devolve o foco; no móvel, a pesquisa restringe os grupos e escolher uma ligação fecha o menu.
|
||||
|
||||
«As minhas tarefas» aparece primeiro nas requisições; fornecimento/reposição e importação têm secções próprias. Os indicadores do painel abrem todas as requisições, pendentes ou aprovadas; uma ligação separada apresenta as decisões disponíveis para o utilizador. As listas vazias explicam o conjunto e os filtros, sem pressupor que não existem pedidos na empresa.
|
||||
|
||||
Verificação: 37 testes frontend dirigidos em quatro ficheiros, tipos e análise dos ficheiros alterados aprovados. Contrato de 149 entradas nos seis papéis anteriores aprovado, sem novas concessões. Edge nativo demonstrou pesquisa, teclado/Escape, acesso directo a Importações e menu móvel a 390×526. O painel em QA mostrou três pendentes e zero decisões pessoais: as ligações abriram respectivamente os três pedidos e a lista pessoal vazia. A pesquisa privada não revelou a exportação sem autoridade própria. Confirmados visualmente um único botão de limpeza e uma única mensagem sem resultados. A última alteração textual das listas foi verificada por renderização/testes e build, sem nova prova visual atribuída. Ambientes e separadores QA removidos; piloto e SGF preservados. Este incremento não encerra a aplicação integral.
|
||||
|
||||
**Reconciliação de 22/11/2026:** consultar «Aplicação controlada do benchmark» na [matriz existente](matriz-sgc-reconciliada.md). As passagens abaixo são registos datados: «avaliação como proposta de interface», «multimoeda por implementar» e outras pendências antigas não prevalecem sobre entregas posteriores documentadas. Preservam-se como histórico. Benchmark aplicado não equivale a cobertura integral, instalação de capacidades QA ou aceitação empresarial.
|
||||
|
||||
**Administração → Parametrização da aplicação, 30/10/2026:** nova entrada `/administracao/parametrizacao`, para perfis/permissões da empresa, utilizadores/atribuições, limites de aprovação, activação e manutenção TEMPO temporária de consulta. Dois administradores permanentes no arranque e na gestão; nenhum perfil de desenvolvimento é atribuído nas novas empresas. Menus passam a aceitar a combinação das permissões configuradas, com recusa correspondente no servidor. Novas empresas usam os seus perfis; a avaliação existente conserva a preparação sem activação automática. Contrato actual: **107 entradas nos seis perfis de compatibilidade**, incluindo provas de múltiplas permissões configuradas; catálogo da avaliação com **23 páginas**. Ver `proofs/organization-configuration.json` e provas relacionadas. A gestão universal de etapas/condições e a granularidade por operação ainda não estão concluídas. Visual pendente pela limitação da ferramenta anteriormente registada.
|
||||
|
||||
@@ -1,8 +1,72 @@
|
||||
# Continuidade do desenvolvimento do SGC
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputa??es,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
29/11/2026 — continuação para candidata operacional: interface integral466testes/92ficheiros aprovada. Conferidos por bytes68ficheiros dos dois runtimes congelados e184entradas da compilação99b07243. Inventariados27adaptadores e5migraçõesQA na proposta compras-operational-candidate-proposal.json, sem promoção, instalação ou activação executadas. Pedida decisão específica de promoção de contratos/artefactos porque a autorização anterior exclui publicação/instalação operacional. C2: confirmação antiga cancelada e preparação descartada com original preservado; nova tentativa, já comURL/identidade conferidos e observação conjunta, voltou a ser interrompida pela ferramenta no diálogo nativo. Não confirmar a decisão por outra interface nem declarar aprovação; frente visual parada, bases/roles removidos. Corrigidas24notas próprias e4rótulos documentais com acentos corrompidos, escritaUTF-8 e round-trip conferidos. A promoção aguarda resposta; aplicação integral não declarada concluída.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissção,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
29/11/2026 — cancelamento C2 legado: a revisão nativa encontrou o ramo de documento incompleto sem estado/formulário operacional, apesar da autorização existente. Reposto o componente comum apenas com o DTO autorizado, preservando desconhecidos. Frontend18/2ficheiros, tipos/análise/build aprovados, manifesto99b07243/184entradas. Edge demonstrou pedido com fundamento/suporte, autor sem decisão e origem suspensa; Finanças independente recusou fundamento vazio e seleccionou Aprovar. Ao preencher motivo/accionar decisão, a ferramenta interrompeu o turno por não conseguir confirmar o URL; confirmação/aprovação final não observadas. Não repetir uma acção incerta. A conferência final não passou por faltar cancelamento aprovado. Base/roleQA removidos; separador/possível diálogo não puderam ser fechados. Retomar em nova composição isolada e confirmar decisão/conservação/móvel/impressão. Provas issued-order-cancellation.json/product-review-20261122.json; aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — comparação de cotações: acesso directo à adjudicação preservado e etapas/documentos relacionados reunidos num grupo fechado por defeito, sem alterar destinos ou condição do mínimo urgente. Desktop com duas colunas e390×526 com uma; sete destinos legíveis e ligação de origem abriuREQ-2026-000003/Aprovada/v3. Frontend14/3ficheiros, tipos/análise/build aprovados, manifesto4b9768dc/184entradas. O helper de teste usa o tipo do componente inicial do Inertia, resolvendo duas advertências da união redundante. Base/role/separadorQA e ferramentas removidos, original preservado. Provas product-review-20261122.json/menu-code-contract.json/requisition-history.json. Sem gravações, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — mínimo urgente demonstrado no navegador: política sintética20unidades/stock livre0/natureza e utilização explícitas, recusa sem fundamento, conferência20 gravada e persistida após recarga. Comparação passou3→1propostas, mantendo2avaliações independentes. Desktop/390×526 legíveis; conferência readonly confirmou1evidência/1auditoria e13conjuntos financeiros/stock/autoridades intactos. Corrigida a fixture que concluía só a primeira aprovação: circuito nativo agora completa etapas elegíveis e verifica estado/autoridade antes de abrir, preservando os controlos do produto. Primeira base descartada sem conferência; a verificação final dessa tentativa falhou como esperado e o diagnósticoJSON do helper foi corrigido. Manifesto0aa249f4/184entradas, bases/roles/separadoresQA removidos. Orientações de contratos/acordos/reposição/importação contextualizadas, frontend13/1ficheiro, tipos/análise/build aprovados e quatro áreas conferidas a390px; importações sem atalho genérico de contratos. Provas requisition-history.json/rq01-account-assignment-qa.json/product-review-20261122.json. Não activa políticas reais nem encerra a aplicação.
|
||||
|
||||
29/11/2026 — recuperado controlo nativo e fechada a janelaQA antiga. A390×526/100%, avaliação com cinco atalhos em coluna e destinos medidas/contraditório abaixo do cabeçalho; pesquisa contratos mostra só Fornecimento habitual, fecha o menu e permite passar de acordos a contratos. Rótulo de criação, referência QA-VISUAL-CONTRACT e ligações espaçadas legíveis. Prazo urgente sintético mostra início04:12:15/expiração04:17:15 e explicação do prazo reduzido, sem executar comandos. Mesmo manifesto419da033, sem recompilação para esta prova; base/roleQA e janela própria removidos, originais preservados. Provas product-review-20261122.json/supplier-evaluations-http.json/menu-code-contract.json/requisition-history.json. Não é ensaio da redução de cotações pelo stock mínimo nem aceitação integral.
|
||||
|
||||
28/11/2026 — auditoria e relações entre módulos: eventos de planeamento, controlo/cancelamento da compra e devolução ao armazém acompanham os registos já exportados, nas famílias Compras/stock correspondentes. Regressão verifica inclusão, separação entre famílias e leitura sem alterar fontes; ZIP real contém planeamento/cancelamento em Compras e devolução em stock, com manifesto/hashes conferidos. SQLite18/558 antes das últimas asserçõesZIP e delta1/421 sobreposto; PG final18/564, PHPStan0/Pint/sintaxe aprovados, base/roleQA removidos. Complementa o delta de fornecedores, sem repetir concessões, activar instalação ou declarar aceitação integral. Prova audit-export-scope-proposal.json.
|
||||
|
||||
28/11/2026 — auditoria de fornecedores: corrigida omissão dos eventos de avaliação, medidas e contraditório no pacote de Compras, mais cinco acções explícitas do cadastro/documentos. Bancos, acções futuras desconhecidas, outras famílias e empresas continuam excluídos; projecção dos eventos conserva apenas metadados. ZIP real de teste inclui os três eventos de seguimento, exclui evento bancário/payload e mantém manifesto/hashes/idempotência. SQLite conjunto17/536 e deltaZIP1/415 sobreposto; PG final17/542, PHPStan0/Pint/sintaxe/diff aprovados, base/role removidos. Fixture estrangeira corrigida com autor próprio/payload obrigatório, sem alterar restrições. Prova audit-export-scope-proposal.json. Sem nova descarga nativa, activação ou aceitação integral.
|
||||
|
||||
28/11/2026 — conflitos e preparação visual: revisão anterior a390×526/100% confirmou levantamento pela direcção, lista com um impedimento activo e outro levantado, deslocação confinada à tabela e histórico do outro conflito bloqueante; originais e13conjuntos financeiros/stock/autoridade conservados. Corrigida a preparaçãoQA que omitia os três ícones públicos: arranque seguinte verificouHTTP200 e SHA256 exacto dos originais. Nesta sessão, as ferramentas abriram a390px no login, mas cliques/leitura nativos expiraram; atalhos de avaliação e contratos mantiveram a prova desktop/janela502px, sem nova prova390 nesse momento. Base/roleQA removidos; fecho da janela própria não confirmado nessa passagem. Provas product-review-20261122.json/requisition-history.json. Recuperação posterior registada em29/11; aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — conflitos: Edge desktop demonstrou que Administração sem competência própria não recebe levantamento; direcção sintética com função própria exige fundamento, levanta apenas declaração1 e conserva declaração2 bloqueante. Corrigida lista que ainda negava levantamento: texto segue a decisão expressa e cada conflito declarado distingue impedimento activo/levantado, sem mudar o original; consulta de raízes limitada à página/âmbito visível. SQLite/PG47/473cada, frontend11/2ficheiros, tipos/PHPStan0/Pint/análise/build aprovados. Primeiras duas asserções novas falharam por falta de atribuição na fixture após activar perfis; corrigida apenas a preparação sintética e mantida recusa403a identidade sem atribuição. Revisão final e recarga confirmam os dois estados; conferência readonly conserva dois originais e13frames financeiros/stock/autoridade, uma decisão/auditoria, outro impedimento continua activo. Comparação de snapshot é canónica quanto à ordem das chavesJSON; frames do utilizador comparam identidade/empresa/departamento/papel, não tokens normais de autenticação. Manifesto419da033/184entradas; bases/rolesQA removidos e separador original preservado. Provas requisition-history.json/product-review-20261122.json; sem nova revisão móvel/impressão, concessões reais, activação ou aceitação integral.
|
||||
|
||||
28/11/2026 — navegação adaptada recuperada por alternativa independente: nova janelaQA redimensionada pelo menu do sistema, sem alterar limites das janelas originais. Captura final502×998px da janela (viewportCSS não medido); atalhos da avaliação em coluna, salto ao contraditório com título abaixo do cabeçalho, conteúdo sem corte lateral observado, menu adaptado/pesquisa contratos e passagem a Fornecimento/Contratos com rótulos/referência/ligações legíveis. Janela própria fechada, originais confirmadas no inventário e base/roleQA removidos. Build observado c4d051cc; não declarar nova prova390px. Frontend conjunto final458/92ficheiros aprovado, sem somar às execuções anteriores; correcção do foco legal restringe procura aos controlos inválidos, evitando seleccionar agrupamentos. Compilação privada final11185f53/184entradas sem faltas, fixada no runner; esta compilação posterior teve apenas esse delta de foco, sem repetir revisão nativa dos menus. Provas product-review-20261122.json/supplier-evaluations-http.json/menu-code-contract.json. Aplicação integral e aceitação empresarial continuam abertas.
|
||||
|
||||
28/11/2026 — navegação na avaliação de fornecedores: atalhos recolhidos por defeito para evidências, última decisão quando existente, conferência/rectificação conforme capacidade, histórico fora do relatório, medidas e contraditório. Destinos focáveis reutilizam o afastamento do cabeçalho; navegação oculta na impressão. Frontend23/4ficheiros, tipos/análise/build aprovados. Edge desktop confirmou cinco destinos presentes e saltos às medidas/contraditório com títulos visíveis; sem gravações. Manifestoc4d051cc/184entradas, base/roleQA removidos e separador original preservado. Revisão móvel continua por confirmar: comando de programação disponível no menu, mas submenu fora da geometria principal; clique na captura separada expirou e alternativa pelo teclado não abriu ferramentas. Frente parada sem nova prova móvel/impressão. Provas supplier-evaluations-http.json/product-review-20261122.json; aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — medida de melhoria nativa: três sessões sintéticas distintas demonstraram criaçãoMM-2v1 porQA reviewer, responsávelQA head/prazo6/12/2026 pelos segmentos nativos da data, progressov2 e pedidov3/A aguardar conferência. Sem evidência, pedido desactivado; responsável não vê confirmar o próprio encerramento. Finanças independente fundamenta e encerra v4; resultado/evidência/revisor/estado persistem após recarga, AVF-1 conserva Aprovada/v3 no ecrã e histórico total7inclui medida anterior. Fecho sem aviso residual, base/roleQA removidos e separador original preservado. Mesmo build872018a8; sem nova lógica de produto, nova prova móvel/impressão, operação financeira, envio externo ou aceitação integral. Prova supplier-evaluations-http.json. O preenchimento observado por segmentos resolve esta introdução de data; não equivale a sucesso do selector do sistema anteriormente indisponível.
|
||||
|
||||
28/11/2026 — conclusão do contraditório: em nova base descartável, CTR-2v2 preparado/submetido pelos serviços nativos; Finanças independente selecciona acolhimento e fundamento no navegador. Recusa sem seguimento visível e valores conservados; seguimento/referência fictícios preenchidos e conclusãov3 persistida após recarga, com autoria/histórico6consultáveis. AVF-1 permanece Aprovada/v3 no ecrã. Ensaio separado do ciclo anterior de devolução/correcção, não alegar uma única execução contínua. Sintaxe/Pint da fixture aprovados; mesmo build872018a8, sem recompilação ou nova lógica de produto. Base/roleQA removidos e separador original preservado; sem envio externo, nova prova móvel/impressão ou aceitação integral. Provas supplier-responses-http.json/supplier-evaluations-http.json.
|
||||
|
||||
28/11/2026 — fornecimento e contratos: vigência/default/acordos/contratos mantêm a entrada existente Fornecimento habitual apenas quando autorizada; pesquisa reconhece acordos/contratos/vigência sem novas concessões. Corrigidos rótulo Novo contrato com vários artigos, título pela referência documental escapada e ligações encostadas, agora num grupo com quebra e espaçamento. Frontend39/4ficheiros, tipos/análise dirigida/build aprovados. Edge desktop confirmou destaque na vigência, pesquisa com uma opção, regresso ao cadastro e apresentação final. A emulação móvel não abriu em duas tentativas, sem progresso; esta frente foi parada e não há nova prova móvel. Manifesto final872018a8/184entradas; bases/rolesQA removidos, separador original/piloto/SGF preservados. Provas product-review-20261122.json/menu-code-contract.json; sem aceitação integral.
|
||||
|
||||
28/11/2026 — contraditório: Edge desktop demonstrou criaçãoCTR-2v1, recusa sem data conservando argumentos, data28/11/2026 introduzida pelos segmentos nativos, gravaçãov2 e submissãov3. Finanças independente devolve com fundamentov4; autoria consulta motivo, corrige referênciav5 e resubmetev6/Em análise. Avaliação aprovadaAVF-1v3 preservada no ecrã; histórico total9inclui o contraditório anterior. Fecho sem aviso residual; sem conclusão final, envio externo, revisão móvel ou impressão nesta passagem. Frontend conjunto448/92ficheiros aprovado, sobreposto aos testes dirigidos, sem somar. Manifesto084b3d39; base/roleQA removidos e separador original preservado. Provas supplier-responses-http.json/supplier-evaluations-http.json. Aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — IVA documental: proposta da taxa normal16% a partir do exemplar partilhado da Lei22/2022, artigo17/BR250p2238, início1/1/2023 pelo artigo6p2239. Fonte verificada por bytes/hash; códigos e base ficam vazios para preenchimento expresso e outras três imposições indeterminadas. Nenhuma fórmula de base ou consolidação jurídica automática. SQLite4/231, PG congelado12/289, frontend final28/3ficheiros, tipos/PHPStan0/Pint/análise dirigida/build aprovados. Edge desktop confirmou fonte/taxa/data/campos em falta e recusa por código obrigatório; corrigido campo ocultado pelo cabeçalho fixo, com regressão e repetição nativa mostrando-o ao centro. Preparação descartada, sem gravação/publicação; gravação sintética e recusa de base ausente verificadas apenas nos testes backend. Manifesto084b3d39/184entradas, bases/rolesQA removidos e separador original preservado. Provas import-legal-readiness-qa.json/import-legal-amounts-qa.json; sem nova vista móvel, activação ou aceitação integral. Primeira invocação PG seleccionou suiteFX por faltar o modo exterior; não conta como provaIVA, substituída pela execução dirigida correcta.
|
||||
|
||||
29/11/2026 — preparação da avaliação de fornecedores: evidências e fundamento da decisão passam a recuperar por utilizador/empresa/contexto/versão, com comparação canónica e protecção comum. Frontend21/4ficheiros, tipos/análise/build469de423/184entradas aprovados. Edge desktop conferiu rascunho pela autoria e decisão por Finanças independente: aviso/continuar, navegação completa/Voltar com texto recuperado, nova saída protegida antes de escrever e limpeza sem aviso residual. Nenhuma gravação/submissão/aprovação/devolução executada no navegador. Tentativa inicial foi recarga causada por preenchimento automático do endereço anterior; sessão intacta, destino exacto confirmado antes da repetição válida. Base/roleQA removidos e separador original preservado. Provas supplier-evaluations-http.json e requisition-history.json. Não atribuir nova revisão móvel ou concluir aplicação integral.
|
||||
|
||||
29/11/2026 — seguimento da avaliação: uma medida sintética encerrada e um contraditório concluído criados pelos serviços nativos com responsáveis/revisão independente; comparação antes/depois conservou o original aprovado. Edge desktop/390×526 confirmou estado, versões3, resultado/evidência, origem dos argumentos, decisão e seguimento. Impressão3folhas com medida e contraditório inteiros, cancelada; a introdução da secção do contraditório ficou na folha anterior ao registo. Não equivale a ensaio completo de edição/devolução pelo navegador nem comunicação externa. Mesmo manifestob695d6e2, sem recompilação/repetição de testes por não alterar produto. Base/roleQA removidos, original/piloto/SGF preservados. Provas supplier-evaluations-http.json e supplier-responses-http.json; restantes percursos e aceitação integral continuam abertos.
|
||||
|
||||
29/11/2026 — avaliação de fornecedores: relatório identifica revisor preservado, mesmo ao consultar página vazia do histórico, e apresenta data legível. Edge desktop/390×526 confirmou autoria, critérios, período e revisão independente; impressão final2folhas conserva revisor/fundamento/data juntos na segunda, cancelada. Corrigido período do exemplo QA para incluir a ordem sintética e incluída guarda de regressão. SQLite18/266 antes do ajuste de savepoints e delta1/28; PG final18/268, frontend17/3ficheiros e regressão final2/1 sobreposta, tipos/PHPStan0/Pint/análise/build aprovados. Primeiro PG17/18 revelou teste histórico que não recuperava da recusa SQL esperada; savepoints preservam os controlos e a revisão aprovada. Manifestob695d6e2/184entradas; todas as bases/roles/separadoresQA removidos, original/piloto/SGF preservados. Prova supplier-evaluations-http.json. Medidas/contraditório não vazios e restantes percursos continuam abertos; sem aceitação integral.
|
||||
|
||||
29/11/2026 — importação documental: quatro originais sintéticos e ligação ao suporte bancário conferidos em Edge; a390×526 título, estado e prazo legíveis. Corrigido contexto genérico do menu em dossiê/suporte/acompanhamento/custos, com destaque Importações apenas para entrada já autorizada. Frontend22/4ficheiros, tipos/análise/contrato149/6/build4857fa1b/184entradas aprovados. Edge desktop confirmou Compras/Importações e gravou revisão bancária v2, conservando v1, uma factura exigida, prazo28/11 e entrega por indicar; recarga e fecho sem falso aviso. Sem novo upload/selectores/JUE/operação bancária; móvel observado antes da correcção exclusivamente de menu. Bases/rolesQA removidos, original/piloto/SGF preservados. Provas import-bank-support-qa.json, import-dossier-qa.json e product-review-20261122.json. Nove requisitos reconciliados em rq01-import-reconciliation.json, conservando estados históricos e limites. Aplicação integral continua aberta.
|
||||
|
||||
29/11/2026 — recepção: ligação directa às facturas da ordem no detalhe, apenas para Administração/Finanças actuais. SQLite3/95, PostgreSQL6/201, frontend11/3ficheiros, tipos/PHPStan0/análise/build aprovados; consulta conserva fontes financeiras/stock e outra empresa recebe404. Percurso nativo final480verificações/53POST/sete perfis, projecto próprio incluído, 100MZN=40+60/saldo0/stock1/diário0; não somar às execuções anteriores. Edge desktop abriu da recepção1 as facturas filtradas da ordem2 no bloco de documentos. Impressão anterior da recepção numa folha,1recebida/1aceite/0rejeitada, cancelada. Cadastro próprio usa protecção comum: frontend19/3ficheiros e Edge confirmaram aviso, continuar com valor conservado, limpeza e saída sem aviso residual. Manifestoe9472d5f/184entradas; base/roleQA removidos e separador original preservado. Provas receipt-print.json, rq01-account-assignment-qa.json e capital-register-qa.json. Sem revisão móvel adicional desta ronda, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — preparações de importação: classificação, estimativa, dossiê, suporte bancário e custo de aterragem reutilizam a protecção comum de alterações, preservando chaves/histórico e operações existentes. Consulta pautal GET identificada separadamente. Frontend28/8ficheiros, tipos, análise dirigida e build76a28260/184entradas sem ficheiros em falta aprovados. Edge desktop confirmou pesquisa QA-TARIFF sem falso aviso, proposta1234.56 protegida, cancelamento de saída com valor conservado e limpeza/fecho sem aviso residual. As outras quatro páginas e a vista móvel não tiveram nova revisão nativa nesta ronda. Base/roleQA removidos, piloto/SGF e separador original preservados. Prova requisition-history.json; aceitação integral continua aberta.
|
||||
|
||||
29/11/2026 — relações entre módulos demonstradas em QA: projecto próprio → requisição → ordem com versão congelada → recepção → factura → pagamentos. Último percurso HTTP nativo: 464 verificações, 53 POST/sete perfis; 100 MZN, confirmações 40+60, saldo zero, uma entrada de stock, nenhum diário. Ligações financeiras respeitam os acessos existentes. Corrigidos o indicador do controlo orçamental e o redireccionamento Inertia da impressão. PostgreSQL dirigido 6/181, SQLite navegação/impressão 3/75 e frontend financeiro 22/5 ficheiros aprovados, assim como tipos/PHPStan. Edge desktop/móvel conferiu o percurso; impressão completa em duas páginas e legado de 50 linhas em três, canceladas. Provas capital-register-qa.json, rq01-account-assignment-qa.json e product-review-20261122.json. Execuções sobrepostas não se somam.
|
||||
|
||||
29/11/2026 — base legal: gravação nativa do coeficiente sintético 0,0099 MZN/g como v2, recarga persistente e leitura móvel demonstradas, sem publicação/cálculo real. Cinco preparações usam a protecção comum. Atalhos condicionais e destaque de Importações apenas para entradas autorizadas; frontend final 35/4 ficheiros, tipos/análise dirigida/contrato149/6/build aprovados. Edge desktop confirmou seis atalhos, salto de Preparar nova versão ao editor abaixo do cabeçalho, valor exacto copiado e limpeza/fecho sem aviso residual. Esta última ronda não teve revisão móvel. Manifesto privado5027dc10; base/roleQA e separador próprios removidos. Provas import-legal-amounts-qa.json e product-review-20261122.json. Piloto/SGF preservados; continuar a reconciliação transversal, sem declarar aceitação integral.
|
||||
|
||||
28/11/2026 — parametrização organizada por atalhos condicionais para secções presentes e focáveis; título antes da localização administrativa, destinos abaixo do cabeçalho fixo e acesso directo aos prazos/perfis de revisão de urgências conforme disponibilidade. Subpáginas conservam Administração apenas quando o menu de origem já é autorizado. Políticas usam a protecção comum: regresso pelo histórico recuperou o motivo e bloqueou saída sem novo input; continuar a editar preservou-o, limpar permitiu fechar. Recarga completa confirmada limpa o histórico por comportamento explícito do Inertia instalado; não confundir com Voltar/Avançar. Frontend57/10ficheiros, organizaçãoSQLite25/267, tipos/PHPStan0/análise dirigida/contrato149entradas/6papéis/build aprovados. Edge desktop/390×526 conferiu atalhos e prazos30/5minutos sintéticos, sem gravar políticas. Manifestod6c7d85e/183entradas sem faltas; QA removido, piloto/SGF e separador original preservados. Provas product-review-20261122.json e requisition-history.json. Sem aceitação integral.
|
||||
|
||||
28/11/2026 — consulta e stock: oito filtros de leitura separados das preparações de negócio, sem retirar a protecção de criação/revisão de fornecedores. Frontend23/5ficheiros, tipos/análise dirigida/build e consulta Edge de ARM-TEST com QA sem falso aviso passaram. Corrigida também mensagem histórica sobre reservas: explica a capacidade actual; indisponibilidade conserva compromisso/saldo livre desconhecidos e não gera sinal de mínimo por inferência. SQLite3/59, PostgreSQL56/921 e concorrência, frontend7/2ficheiros, tipos/PHPStan0/análise/build e leitura nativa aprovados. Provas requisition-history.json e warehouse-availability.json; manifesto1beb4e59/183entradas sem faltas, QA removido e piloto/SGF preservados. Formato geral assinalou ficheiros históricos fora do recorte; apenas os afectados foram formatados. Aplicação integral continua aberta.
|
||||
|
||||
28/11/2026 — pesquisa de ordens operacionais: referência, local e descrição consultáveis no âmbito nativo da empresa/departamento e competências actuais; resultados mínimos ligam directamente ao registo seleccionado, mesmo fora da primeira página. Âmbito recolhido para dar prioridade ao formulário móvel. SQLite15/500, PostgreSQL9/231, frontend31/4ficheiros, tipos/check/Pint/PHPStan0 aprovados. Edge desktop e390×526 confirmou pesquisa, resultado Registada, abertura da origem18 e Voltar com critérios preservados; ligação de regresso ao cadastro verificada em backend/frontend, sem clique nativo. Buildf0e64c67/183entradas; base/role e separador próprios removidos, original preservado. Prova operational_order_search_delta_20261128 em rq01-account-assignment-qa.json. Sem activação, efeitos financeiros/stock ou alteração SGF; aplicação integral permanece aberta.
|
||||
|
||||
28/11/2026 — pesquisa de projectos/imobilizado ligada ao cadastro próprio e à sua versão/histórico, por código/nome/referência, com isolamento nativo de empresa/departamento/competência e paginação. Entrada própria do menu condicionada à capacidade/acesso, destaque correcto e sinónimos; resultados positivos antes das áreas vazias recolhidas. SQLite e PG20/495 cada, frontend39/4ficheiros, tipos/PHPStan0/check/Pint/contrato aprovados. Edge criou projecto sintético v1, pesquisou pelo formulário, abriu histórico e conservou consulta ao regressar; móvel390×526 legível, dez áreas vazias recolhidas. Prova capital-register-qa.json. Revisão identificou falso aviso GET e marcação residual após limpar edição: consultas explicitamente identificadas e estado publicado pelo formulário prevalece sobre fallback genérico; pesquisas guardadas usam hook comum. Regressões34/5ficheiros e native final2c08ae1d confirmaram consultaRA-1 sem aviso, outra edição protegida/cancelada com campos conservados, limpeza seguida de consultaRA e fecho sem aviso residual. Prova requisition-history.json. Candidata `sgc-managed-query-final-qa-20261128`,183entradas sem faltas, fixada no runner. Todos os ambientes/separadoresQA removidos; piloto1edb9ab0/SGF e separador original preservados. Restantes fontes/ligações e aceitação integral continuam abertas.
|
||||
|
||||
28/11/2026 — ICE: localizado e preservado o original oficial da AT da Lei7/2025 no2.ºsuplemento,380.932bytes/SHA9b10862f...,2páginas. Anexo2180-(22) contém11posições e coluna2026/2027; artigo6 indica01/01/2026 e rodapé declara sem efeito a publicação anterior desta Lei7, sem retirar por inferência a Lei8. Propostas editáveis por hash/bytes exactos, rótuloICE/Livre, período até31/12/2027; direitos/IVA/outros mantêm-se desconhecidos. SQLite11/260, PG final11/260, frontend24/3ficheiros, tipos/PHPStan0/check/Pint/build aprovados. Primeiro PG excedeu180s, causa não provada; caso isolado1/166 e grupo final passaram, bases removidas. Edge gravou8703.80.10/5% como v1/Em preparação, período correcto; móvel390×526 conferido. Sem publicação, activação ou efeitos financeiros. Prova ice_second_supplement_delta_20261128 em import-legal-readiness-qa.json. Candidata053dbe44/183entradas sem faltas fixada no runner; QA removido, piloto/SGF preservados. Restante ICE/IVA/acervo e aplicação integral continuam abertos.
|
||||
|
||||
28/11/2026 — relatórios organizados por atalhos internos condicionados aos blocos autorizados existentes; filtros/CSV/origens preservados. Onze testes/6ficheiros, tipos/check/build aprovados. Edge desktop e390×526 confirmou navegação mantendo status=pending e título/campos visíveis após corrigir sobreposição pelo cabeçalho, com regressão. Prova report_navigation_delta_20261128 em product-review-20261122.json. Candidata privada final6af5a1fe/183entradas sem faltas fixada no runner; bases/roles/separadoresQA removidos, original/piloto/SGF preservados. Não encerra relatórios ou aplicação integral; continuar reconciliação das lacunas efectivas.
|
||||
|
||||
28/11/2026 — menus e painel: pesquisa directa no desktop, termos sem acentos/sinónimos sobre entradas autorizadas, tarefas primeiro e secções de fornecimento/importação. Indicadores ligam às listas existentes; decisões pessoais têm ligação própria. Edge QA confirmou três pendentes/zero decisões e os conjuntos correctos, pesquisa sem acesso privado, teclado, Escape e menu móvel; removidas duas duplicações visuais. Listas vazias agora explicam filtros/decisões. Frontend37/4ficheiros, tipos/check/build e contrato149entradas/6papéis aprovados. Prova em product-review-20261122.json e descrição em menus-benchmark-20261029.md. Bases/roles/separadores QA removidos; sem publicação ou concessões. Continuar as relações funcionais e a revisão transversal existentes; não declarar aplicação integral concluída.
|
||||
|
||||
28/11/2026 — precisão da taxa específica: coeficientes fraccionários de cêntimo conservados como decimal exacto até seis casas em unidade menor/oito em MZN; resultados monetários continuam inteiros com arredondamento final existente. Corrigida chamada inicial ao método da versão instalada de BigDecimal; regressões incluídas. SQLite15/138, PostgreSQL61/988, frontend23/3ficheiros e tipos/PHPStan/check/Pint/build aprovados; base QA removida. Entrada nativa0,0099MZN recuperada por Voltar/Avançar; gravação decimal pelo navegador não demonstrada. Nenhuma taxa real activada, nenhum escritor financeiro alterado. Prova import-legal-amounts-qa.json; não repetir o bloqueio dos selectores nativos sem nova evidência.
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputações,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
|
||||
28/11/2026 — revisão real corrigiu dois defeitos: histórico de decisão sem fuso era mostrado duas horas antes (DTO agora explicita o fuso, sem alterar originais); detalhe da requisição alargava a página móvel (coluna redimensionável e deslocação limitada à tabela). PostgreSQL3/300,PHPStan0,Pint aprovados; frontend8/2ficheiros,tipos/check/build aprovados. Edge390×526 confirmou datas coerentes,100MZN originais/120MZN da nova submissão,tabela com coluna final alcançável e texto sem corte. AtribuiçãoQA-100 recusou99/100MZN,preservou campos e gravou100/100MZN como v1. Provas requisition-expiry-qa.json e rq01-account-assignment-qa.json. Buildbc1e32071d667b3d3b71e2e7a9822f52ce617cd35bd314bef9b2967e22d45835/183entradas fixado no runner; ambientesQA removidos,piloto/SGF e separador original preservados. Restam revisão transversal e aceitação integral.
|
||||
|
||||
28/11/2026 — recuperação conjunta de auditoria privada demonstrada: pg_dump/pg_restore para outra base e identidade não privilegiada,138tabelas/colunas/linhas iguais; ficheiros restaurados de cópia separada com a árvore original indisponível. ZIP das quatro famílias e original sintético preservam bytes/hash; repetição sem efeitos e revogação actual recusada. Bases77d3a97ec523/a546c3b9d7b8,roles,cluster e raiz próprios removidos. Comando --private-audit-recovery --integrated-schema --frozen-runtime no runner existente; prova audit-export-scope-proposal.json. Sem instalação ou alteração operacional.
|
||||
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
# Entregas por blocos funcionais do SGC
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputa??es,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
28/11/2026 — auditoria e relações entre módulos: eventos de planeamento, controlo/cancelamento da compra e devolução ao armazém acompanham os registos já exportados, nas famílias Compras/stock correspondentes. Regressão verifica inclusão, separação entre famílias e leitura sem alterar fontes; ZIP real contém planeamento/cancelamento em Compras e devolução em stock, com manifesto/hashes conferidos. SQLite18/558 antes das últimas asserçõesZIP e delta1/421 sobreposto; PG final18/564, PHPStan0/Pint/sintaxe aprovados, base/roleQA removidos. Complementa o delta de fornecedores, sem repetir concessões, activar instalação ou declarar aceitação integral. Prova audit-export-scope-proposal.json.
|
||||
|
||||
28/11/2026 — IVA documental: proposta da taxa normal16% a partir do exemplar partilhado da Lei22/2022, artigo17/BR250p2238, início1/1/2023 pelo artigo6p2239. Fonte verificada por bytes/hash; códigos e base ficam vazios para preenchimento expresso e outras três imposições indeterminadas. Nenhuma fórmula de base ou consolidação jurídica automática. SQLite4/231, PG congelado12/289, frontend final28/3ficheiros, tipos/PHPStan0/Pint/análise dirigida/build aprovados. Edge desktop confirmou fonte/taxa/data/campos em falta e recusa por código obrigatório; corrigido campo ocultado pelo cabeçalho fixo, com regressão e repetição nativa mostrando-o ao centro. Preparação descartada, sem gravação/publicação; gravação sintética e recusa de base ausente verificadas apenas nos testes backend. Manifesto084b3d39/184entradas, bases/rolesQA removidos e separador original preservado. Provas import-legal-readiness-qa.json/import-legal-amounts-qa.json; sem nova vista móvel, activação ou aceitação integral. Primeira invocação PG seleccionou suiteFX por faltar o modo exterior; não conta como provaIVA, substituída pela execução dirigida correcta.
|
||||
|
||||
29/11/2026 — recepção: ligação directa às facturas da ordem no detalhe, apenas para Administração/Finanças actuais. SQLite3/95, PostgreSQL6/201, frontend11/3ficheiros, tipos/PHPStan0/análise/build aprovados; consulta conserva fontes financeiras/stock e outra empresa recebe404. Percurso nativo final480verificações/53POST/sete perfis, projecto próprio incluído, 100MZN=40+60/saldo0/stock1/diário0; não somar às execuções anteriores. Edge desktop abriu da recepção1 as facturas filtradas da ordem2 no bloco de documentos. Impressão anterior da recepção numa folha,1recebida/1aceite/0rejeitada, cancelada. Cadastro próprio usa protecção comum: frontend19/3ficheiros e Edge confirmaram aviso, continuar com valor conservado, limpeza e saída sem aviso residual. Manifestoe9472d5f/184entradas; base/roleQA removidos e separador original preservado. Provas receipt-print.json, rq01-account-assignment-qa.json e capital-register-qa.json. Sem revisão móvel adicional desta ronda, activação ou aceitação integral.
|
||||
|
||||
29/11/2026 — preparações de importação: classificação, estimativa, dossiê, suporte bancário e custo de aterragem reutilizam a protecção comum de alterações, preservando chaves/histórico e operações existentes. Consulta pautal GET identificada separadamente. Frontend28/8ficheiros, tipos, análise dirigida e build76a28260/184entradas sem ficheiros em falta aprovados. Edge desktop confirmou pesquisa QA-TARIFF sem falso aviso, proposta1234.56 protegida, cancelamento de saída com valor conservado e limpeza/fecho sem aviso residual. As outras quatro páginas e a vista móvel não tiveram nova revisão nativa nesta ronda. Base/roleQA removidos, piloto/SGF e separador original preservados. Prova requisition-history.json; aceitação integral continua aberta.
|
||||
|
||||
28/11/2026 — avanço da base legal:11propostas ICE do2.ºsuplemento da Lei7/2025, com fonte oficial exacta, condições e período2026/2027. Preparação editável gravada como v1 no navegador, conferida390×526; nenhuma regra publicada ou cálculo activado. SQLite/PG11/260 cada, frontend24/3ficheiros, tipos/PHPStan0/check/Pint/build aprovados, QA removido. Prova import-legal-readiness-qa.json. Novos menus/painel e atalhos dos relatórios também demonstrados no navegador, descritos em menus-benchmark-20261029.md/product-review-20261122.json. Candidata privada actual053dbe44/183entradas; piloto/SGF preservados. Restante legislação, cobertura transversal e aceitação integral continuam abertas.
|
||||
|
||||
28/11/2026 — fecho dirigido visual/financeiro: ordem sintética50linhas/100MZN conferida em3páginas,cabeçalhos repetidos,linhas inteiras e total preservado; impressão cancelada. Percurso HTTP409verificações/51POST/7perfis na candidata bc1e3207: pedido/ordem/factura100MZN,pagamentos40+60MZN,saldo0,consumo100MZN,stock1un/1movimento,sem diário contabilístico ou transferência. Edge390×526 confirmou imputações,recusa39/40MZN com campos preservados,revisão40MZN v2 e histórico v1,relatório100MZN/2imputados/0por imputar e factura liquidada. Requisitante conserva etapas financeiras reservadas/403; recusa agora em português com regresso ao painel,teste1/12 e revisão desktop/móvel aprovados. Provas product-review-20261122.json e rq01-account-assignment-qa.json. Todos os ambientes/separadoresQA removidos,piloto/SGF e separador original preservados. Não equivale a aceitação integral ou instalação.
|
||||
|
||||
28/11/2026 — revisão nativa retomada e demonstrada em QA isolado: preparação legal3506.91.20 gravada como v1/Em preparação, sem publicação; selecção móvel, aviso de saída e recuperação por Voltar/Avançar conferidos. Exportação privada das quatro famílias gerada e descarregada pela conta sintética própria; manifesto/hash/tamanho e menu legíveis a390×526. Ordem de produção QA-VISUAL-PROD-20261128 registada pelo procurement após configuração expressa na empresa sintética; referência, local, autor e descrição apresentados na lista móvel. Urgência histórica conserva recusa de redução. Corrigida mensagem que confundia ausência de regras com ausência de fontes; regressão14/2ficheiros. Build visual8a30171b051303e1df299157cea7684c5276846560c9b42c8c782b2ed89dc272/183entradas. HTTP legal final48propostas confirmado na prova, substituindo contagem11do incremento anterior. Base/roleQA removidas; separadorQA fechado e separador original preservado. Esta evidência substitui o bloqueio anterior da ferramenta apenas nos percursos descritos; restantes percursos, impressão e aceitação integral continuam abertos. Provas existentes import-legal-readiness-qa.json e audit-export-scope-proposal.json; piloto/SGF intactos.
|
||||
|
||||
|
||||
@@ -198,5 +198,72 @@
|
||||
"syntax_pint_node_check_diff_passed": true,
|
||||
"operational_changes": false,
|
||||
"limits": "Synthetic QA only; does not certify a production backup schedule, recovery SLA or actual operational installation."
|
||||
},
|
||||
"supplier_event_history_delta_20261129": {
|
||||
"status": "Implemented and verified in isolated synthetic QA",
|
||||
"problem": "Purchasing export included supplier records but omitted their own audit event history.",
|
||||
"change": "Include supplier evaluation, improvement and response event families and the five explicit supplier registration/document actions. Keep bank events, unknown future supplier actions, other families and other companies excluded. Preserve metadata-only event projection.",
|
||||
"verification": {
|
||||
"sqlite_initial_suite": {
|
||||
"tests": 17,
|
||||
"assertions": 536
|
||||
},
|
||||
"sqlite_final_zip_delta": {
|
||||
"tests": 1,
|
||||
"assertions": 415
|
||||
},
|
||||
"postgresql_final_complete_suite": {
|
||||
"tests": 17,
|
||||
"assertions": 542
|
||||
},
|
||||
"zip": "Generated four-family archive contains all three supplier follow-up events; bank event/private payload absent; manifest hashes/counts verified and idempotence preserved.",
|
||||
"phpstan_errors": 0,
|
||||
"pint": "passed",
|
||||
"node_syntax": "passed",
|
||||
"first_fixture_failures": "Foreign synthetic event initially lacked required user_id, then after payload; fixture corrected with its own company actor and explicit synthetic payload. No production constraint changes.",
|
||||
"counts_overlap": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"remaining": "No new native download review for this event-only correction; no full application acceptance."
|
||||
},
|
||||
"planning_cancellation_stock_events_delta_20261129": {
|
||||
"status": "Implemented and verified in isolated synthetic QA",
|
||||
"problem": "Exported planning, cancellation and warehouse return records had no corresponding event history in their own audit family.",
|
||||
"change": {
|
||||
"purchasing": [
|
||||
"planning.",
|
||||
"purchase_control.",
|
||||
"cancellation.",
|
||||
"order_cancellation.",
|
||||
"order_cancellation_policy."
|
||||
],
|
||||
"stock": [
|
||||
"warehouse_return."
|
||||
]
|
||||
},
|
||||
"verification": {
|
||||
"sqlite_suite_before_final_zip_assertions": {
|
||||
"tests": 18,
|
||||
"assertions": 558
|
||||
},
|
||||
"sqlite_final_zip_delta": {
|
||||
"tests": 1,
|
||||
"assertions": 421
|
||||
},
|
||||
"postgresql_final_complete_suite": {
|
||||
"tests": 18,
|
||||
"assertions": 564
|
||||
},
|
||||
"zip": "Verified purchasing planning/cancellation events and stock warehouse-return event in separate NDJSON files, with no cross-family contamination. Every included dataset manifest hash/count checked.",
|
||||
"phpstan_errors": 0,
|
||||
"pint": "passed",
|
||||
"counts_overlap": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"remaining": "No new native visual/download review; whole application acceptance remains open."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,17 +11,61 @@
|
||||
"Frozen origin in ordinary and partial/consolidated native order snapshots and print",
|
||||
"Later register rename/archive does not rewrite accepted choices or issued orders"
|
||||
],
|
||||
"sqlite_register_and_assignments": {"tests": 9, "assertions": 101, "passed": true},
|
||||
"postgresql_directed_native_integration": {"tests": 13, "assertions": 282, "passed": true, "database_removed": true},
|
||||
"postgresql_submission_category_approval_regression": {"tests": 56, "assertions": 941, "passed": true, "database_removed": true},
|
||||
"sqlite_native_search_regression": {"tests": 6, "assertions": 210, "passed": true},
|
||||
"sqlite_register_and_assignments": {
|
||||
"tests": 9,
|
||||
"assertions": 101,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql_directed_native_integration": {
|
||||
"tests": 13,
|
||||
"assertions": 282,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"postgresql_submission_category_approval_regression": {
|
||||
"tests": 56,
|
||||
"assertions": 941,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"sqlite_native_search_regression": {
|
||||
"tests": 6,
|
||||
"assertions": 210,
|
||||
"passed": true
|
||||
},
|
||||
"native_search_delta": "Department-scoped receipt search now checks all consolidated order origins; native company-wide warehouse visibility is preserved and regression-tested",
|
||||
"frontend_directed": {"files": 2, "tests": 11, "passed": true, "includes_journey_help": true},
|
||||
"checks": {"types": "passed", "phpstan": "passed", "scoped_format_lint": "passed", "scoped_pint": "passed", "diff_whitespace": "passed"},
|
||||
"frontend_directed": {
|
||||
"files": 2,
|
||||
"tests": 11,
|
||||
"passed": true,
|
||||
"includes_journey_help": true
|
||||
},
|
||||
"checks": {
|
||||
"types": "passed",
|
||||
"phpstan": "passed",
|
||||
"scoped_format_lint": "passed",
|
||||
"scoped_pint": "passed",
|
||||
"diff_whitespace": "passed"
|
||||
},
|
||||
"concurrency": {
|
||||
"same_operation": [200, 200], "same_version": [200, 409], "blocked_writers_observed": 2,
|
||||
"new_versions_per_scenario": 1, "audits_per_scenario": 1, "new_files": 0, "database_removed": true,
|
||||
"receipt_protocol_regression": {"tests": 10, "assertions": 49, "passed": true}
|
||||
"same_operation": [
|
||||
200,
|
||||
200
|
||||
],
|
||||
"same_version": [
|
||||
200,
|
||||
409
|
||||
],
|
||||
"blocked_writers_observed": 2,
|
||||
"new_versions_per_scenario": 1,
|
||||
"audits_per_scenario": 1,
|
||||
"new_files": 0,
|
||||
"database_removed": true,
|
||||
"receipt_protocol_regression": {
|
||||
"tests": 10,
|
||||
"assertions": 49,
|
||||
"passed": true
|
||||
}
|
||||
},
|
||||
"native_edge_review": {
|
||||
"synthetic_project_created_through_native_form": true,
|
||||
@@ -29,20 +73,51 @@
|
||||
"assignment_version": 1,
|
||||
"source_version": 1,
|
||||
"history_visible": true,
|
||||
"viewports_observed_px": [390, 823],
|
||||
"private_server_stopped": true, "private_root_removed": true, "database_removed": true,
|
||||
"viewports_observed_px": [
|
||||
390,
|
||||
823
|
||||
],
|
||||
"private_server_stopped": true,
|
||||
"private_root_removed": true,
|
||||
"database_removed": true,
|
||||
"user_tabs_preserved": true,
|
||||
"layout_follow_up": "Align page padding with native equipment/requisition pages; mobile overflow was not observed."
|
||||
},
|
||||
"lineage_delta": {"issued_snapshot_used_as_authority": true, "native_receipt_confirmed_and_visible": true, "accepted_quantity": "1.000", "read_did_not_change_stock": true, "pagination_independent_for_orders_and_receipts": true, "later_reversal_and_return_projection": "uses_native_inventory_services; native correction execution not repeated in this increment"},
|
||||
"recovery": {"register_versions_restored": 2, "frozen_assignment_source_version_restored": 1, "archived_head_preserved": true, "replay_without_effects": true, "previous_tables_preserved": 115, "private_originals_preserved": 11, "pre_and_post_extension_restore_equal": true, "source_and_restore_databases_removed": true},
|
||||
"lineage_delta": {
|
||||
"issued_snapshot_used_as_authority": true,
|
||||
"native_receipt_confirmed_and_visible": true,
|
||||
"accepted_quantity": "1.000",
|
||||
"read_did_not_change_stock": true,
|
||||
"pagination_independent_for_orders_and_receipts": true,
|
||||
"later_reversal_and_return_projection": "uses_native_inventory_services; native correction execution not repeated in this increment"
|
||||
},
|
||||
"recovery": {
|
||||
"register_versions_restored": 2,
|
||||
"frozen_assignment_source_version_restored": 1,
|
||||
"archived_head_preserved": true,
|
||||
"replay_without_effects": true,
|
||||
"previous_tables_preserved": 115,
|
||||
"private_originals_preserved": 11,
|
||||
"pre_and_post_extension_restore_equal": true,
|
||||
"source_and_restore_databases_removed": true
|
||||
},
|
||||
"private_build": {
|
||||
"path": "storage/framework/testing/sgc-capital-register-qa-20261127",
|
||||
"manifest_sha256": "baaf8095659bb678e449133dfdd07d1862bb89870f8fbcf44fd2d079474faed1",
|
||||
"passed": true
|
||||
},
|
||||
"private_trace_build": {"path": "storage/framework/testing/sgc-capital-register-trace-qa-20261127", "manifest_sha256": "a17c52e7d05335c54f7fd0f34510cb38af9979388fabb30cf7cc110600870e23", "passed": true},
|
||||
"preserved": {"pilot_manifest_sha256": "1edb9ab0aa62fcf4e9c9075ce6e405de5435dc8ea4799d1949535a96c718df4e", "pilot_activated": false, "migration_created": false, "new_financial_or_stock_writer": false, "sgf_dependency": false},
|
||||
"private_trace_build": {
|
||||
"path": "storage/framework/testing/sgc-capital-register-trace-qa-20261127",
|
||||
"manifest_sha256": "a17c52e7d05335c54f7fd0f34510cb38af9979388fabb30cf7cc110600870e23",
|
||||
"passed": true
|
||||
},
|
||||
"preserved": {
|
||||
"pilot_manifest_sha256": "1edb9ab0aa62fcf4e9c9075ce6e405de5435dc8ea4799d1949535a96c718df4e",
|
||||
"pilot_activated": false,
|
||||
"migration_created": false,
|
||||
"new_financial_or_stock_writer": false,
|
||||
"sgf_dependency": false
|
||||
},
|
||||
"equipment_backlink_delta_20261127": {
|
||||
"status": "implemented_in_isolated_qa_physical_visual_acceptance_pending",
|
||||
"behavior": "Equipment detail links to its explicitly registered current asset reference and existing purchase/receipt trace, including archived reference identities. Matching uses the real equipment ID and permanent reference key, never names. Existing direct purchase/spare-part links remain separate.",
|
||||
@@ -50,14 +125,42 @@
|
||||
"boundaries": "This covers a legacy/native order with explicit documentary asset attribution. It does not certify a full classified-machinery lifecycle, accounting asset posting, depreciation or operational activation. Those are not inferred from equipment registration.",
|
||||
"access": "Fresh actor, current register scope and maintenance restrictions are rechecked; unauthorized reference fields are omitted. Disabling the QA register leaves existing equipment detail available without the additional panel.",
|
||||
"verification": {
|
||||
"sqlite_native_trace": {"tests": 1, "assertions": 65, "passed": true},
|
||||
"sqlite_current_reference_access": {"tests": 1, "assertions": 4, "passed": true},
|
||||
"postgresql_trace_and_reference_access": {"tests": 3, "assertions": 83, "passed": true, "database_removed": true},
|
||||
"sqlite_existing_equipment_regression": {"tests": 7, "assertions": 193, "passed": true},
|
||||
"frontend": {"tests": 2, "passed": true},
|
||||
"types": "passed", "phpstan": "passed", "scoped_format_lint": "passed", "pint": "passed", "diff_review": "passed"
|
||||
"sqlite_native_trace": {
|
||||
"tests": 1,
|
||||
"assertions": 65,
|
||||
"passed": true
|
||||
},
|
||||
"sqlite_current_reference_access": {
|
||||
"tests": 1,
|
||||
"assertions": 4,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql_trace_and_reference_access": {
|
||||
"tests": 3,
|
||||
"assertions": 83,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"sqlite_existing_equipment_regression": {
|
||||
"tests": 7,
|
||||
"assertions": 193,
|
||||
"passed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 2,
|
||||
"passed": true
|
||||
},
|
||||
"types": "passed",
|
||||
"phpstan": "passed",
|
||||
"scoped_format_lint": "passed",
|
||||
"pint": "passed",
|
||||
"diff_review": "passed"
|
||||
},
|
||||
"private_build": {
|
||||
"path": "storage/framework/testing/sgc-equipment-capital-trace-qa-20261127",
|
||||
"manifest_sha256": "6a838cb8e9a8fbf5503e79f31a95c1d5ae2817613701bdbf1ebf71bda9a9f990",
|
||||
"passed": true
|
||||
},
|
||||
"private_build": {"path": "storage/framework/testing/sgc-equipment-capital-trace-qa-20261127", "manifest_sha256": "6a838cb8e9a8fbf5503e79f31a95c1d5ae2817613701bdbf1ebf71bda9a9f990", "passed": true},
|
||||
"pilot_modified": false
|
||||
},
|
||||
"remaining": [
|
||||
@@ -65,5 +168,163 @@
|
||||
"Full assignment/account applicability across RQ-01 categories",
|
||||
"Final visual/mobile/print review after remaining implementation",
|
||||
"Other existing matrix gaps and separately scoped operational preparation"
|
||||
]
|
||||
],
|
||||
"cross_module_search_delta_20261128": {
|
||||
"status": "implemented_and_verified_in_isolated_qa_not_integral_completion",
|
||||
"scope": [
|
||||
"Native register read projection, current versions including archived identity",
|
||||
"Literal code name and documentary reference search",
|
||||
"Company and native department scope and current capabilities",
|
||||
"Metadata only, own pagination, native history and trace destination",
|
||||
"Conditional register menu entry with correct active highlight",
|
||||
"Matching groups precede collapsed empty areas"
|
||||
],
|
||||
"sqlite": {
|
||||
"tests": 20,
|
||||
"assertions": 495,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql": {
|
||||
"tests": 20,
|
||||
"assertions": 495,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"frontend_navigation_search": {
|
||||
"tests": 39,
|
||||
"files": 4,
|
||||
"passed": true
|
||||
},
|
||||
"checks": {
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"menu_route_contract": true,
|
||||
"diff_check": true
|
||||
},
|
||||
"native": {
|
||||
"capital_build": "810d3ec5da279a063e4b6487ed53331908c5a737f5f2b84595d75fcf0a328020",
|
||||
"code": "QA-SEARCH-PROJECT-20261128",
|
||||
"version": 1,
|
||||
"synthetic_register_creation": true,
|
||||
"menu_search_and_highlight": true,
|
||||
"form_search_submission": true,
|
||||
"history_opened": true,
|
||||
"back_preserved_query": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"matching_result_before_ten_collapsed_empty_areas": true
|
||||
},
|
||||
"fixture_corrections": [
|
||||
"Initial revocation test incorrectly added a second profile; replaced with explicit change of the synthetic profile",
|
||||
"When configured access was enabled by the head fixture, the original legacy actor needed an explicit synthetic procurement profile to test feature-off access"
|
||||
],
|
||||
"no_new_schema": true,
|
||||
"no_real_permissions_granted": true,
|
||||
"real_operational_changes": false,
|
||||
"sgf_changed": false,
|
||||
"final_candidate": {
|
||||
"directory": "storage/framework/testing/sgc-managed-query-final-qa-20261128",
|
||||
"manifest_sha256": "2c08ae1dea9d6049befd1c220a11ba8a175ebd96f3ea0f08d5a7baaefce0203b",
|
||||
"entries": 183,
|
||||
"missing": 0
|
||||
},
|
||||
"cleanup": {
|
||||
"preview_databases_removed": true,
|
||||
"preview_roles_removed": true,
|
||||
"owned_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"remaining": "Other cross-module search sources, transversal review and integral acceptance remain separately scoped"
|
||||
},
|
||||
"native_project_financial_trace_delta_20261129": {
|
||||
"status": "native_http_and_visual_verified_in_isolated_qa",
|
||||
"scope": "Own project created by native HTTP, explicitly chosen by request owner, frozen as version 1 in an issued order and traced to its actual physical receipt. Finance follows the exact order filter to its invoice and payment records. No accounting capitalisation or project valuation is inferred.",
|
||||
"project": {
|
||||
"record_key": "eaf3cd6a-8721-46d3-abd1-d3e424c89338",
|
||||
"code": "HTTP-PROJECT-QA",
|
||||
"version": 1
|
||||
},
|
||||
"native_http": {
|
||||
"checks": 461,
|
||||
"native_post_requests": 53,
|
||||
"fortify_sessions": 7,
|
||||
"request_id": 7,
|
||||
"order_id": 2,
|
||||
"invoice_id": 1,
|
||||
"payment_ids": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"request_total_minor": 10000,
|
||||
"order_total_minor": 10000,
|
||||
"invoice_total_minor": 10000,
|
||||
"confirmed_payments_minor": [
|
||||
4000,
|
||||
6000
|
||||
],
|
||||
"outstanding_minor": 0,
|
||||
"budget_consumed_minor": 10000,
|
||||
"budget_available_minor": 90000,
|
||||
"order_budget_checked": true,
|
||||
"stock_quantity_milli": 1000,
|
||||
"stock_movements": 1,
|
||||
"journals": 0,
|
||||
"explicit_finance_category_total_minor": 10000
|
||||
},
|
||||
"visual": {
|
||||
"desktop_project_order_receipt_origin": true,
|
||||
"desktop_project_to_order_to_invoice_to_payments": true,
|
||||
"new_order_budget_confirmation_visible": true,
|
||||
"invoice_destination_skips_registration_form": true,
|
||||
"mobile_width": 390,
|
||||
"mobile_height": 526,
|
||||
"mobile_invoice_card_and_payment_link_visible": true,
|
||||
"mobile_payment_navigation_preserved_invoice_id": 1,
|
||||
"confirmed_100_pending_0_visible": true,
|
||||
"business_posts_in_browser": false
|
||||
},
|
||||
"manifest_sha256": "3405190f73702906bdde29cb0d35ce1d4252c3886eaf715a3c9edb28ab5a624c",
|
||||
"manifest_entries": 184,
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_browser_tab_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"post_visual_sql_snapshot": false,
|
||||
"limits": "Synthetic QA only; no real bank, SGF, grants, activation, installation or integral application acceptance. The invariant snapshot belongs to HTTP verification before visual reading."
|
||||
},
|
||||
"preparation_guard_delta_20261129": {
|
||||
"scope": "Common managed preparation hook; no new writer or permission",
|
||||
"frontend_tests": 19,
|
||||
"frontend_files": 3,
|
||||
"types": true,
|
||||
"scoped_format_lint": true,
|
||||
"build": true,
|
||||
"manifest_sha256": "e9472d5fdb99844147e427c0fd094f4b7910c11aad2966d0011442b979218846",
|
||||
"native_desktop": {
|
||||
"unsaved_name_warned": true,
|
||||
"continue_editing_preserved_name": true,
|
||||
"clear_then_navigation_without_warning": true
|
||||
},
|
||||
"mobile_this_delta": false,
|
||||
"cleanup_database_role_and_own_tab": true
|
||||
},
|
||||
"section_navigation_delta_20261129": {
|
||||
"scope": "Preparation and history anchor targets, existing permissions and form operations preserved",
|
||||
"frontend_tests": 20,
|
||||
"frontend_files": 3,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true,
|
||||
"manifest_sha256": "ffa716658f1fddae37b85ab86135f849d031e805fd873524942f99716ce33b8c",
|
||||
"manifest_entries": 184,
|
||||
"native_desktop_preparation_anchor_below_sticky_header": true,
|
||||
"native_revision_copy_this_delta": false,
|
||||
"native_history_jump_this_delta": false,
|
||||
"mobile_this_delta": false,
|
||||
"cleanup_database_role_own_tab": true,
|
||||
"original_tab_preserved": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"date": "2026-11-29",
|
||||
"status": "approved_for_operational_candidate_promotion",
|
||||
"owner_response": "autorizo",
|
||||
"proposal": "compras-operational-candidate-proposal.json",
|
||||
"proposal_sha256": "a6b2c699af0c27598f059d23caa247102e3467bb95335b893ba28729646570f7",
|
||||
"scope": "Promote the proposed QA extensions to versioned distributable standalone Compras operational candidate; verify only in isolated synthetic QA.",
|
||||
"pilot_or_production_installation": false,
|
||||
"pilot_or_production_activation": false,
|
||||
"sgf_operational_changes": false,
|
||||
"real_data_or_permission_changes": false
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"data": "2026-11-29",
|
||||
"estado": "Proposta concreta para decisão; promoção ainda não executada",
|
||||
"decisao_pedida": "Autorizar a promoção das extensões já verificadas em QA para uma candidata operacional distribuível de Compras, com contratos versionados e configuração de instalação própria; sem instalação ou activação no piloto/produção.",
|
||||
"origem_do_limite": [
|
||||
{
|
||||
"referencia": "docs/proofs/import-landed-cost-contract-authorization.json",
|
||||
"limite": "approved_for_development_and_isolated_qa_only; exclui Published/installed artifacts"
|
||||
},
|
||||
{
|
||||
"referencia": "docs/proofs/requisition-expiry-contract-proposal.json",
|
||||
"limite": "Preparação privada QA autorizada; operational_installation, pilot_migration_or_activation e sgf_operational_changes false"
|
||||
},
|
||||
{
|
||||
"referencia": "AGENTS.md, secções 3, 6 e 7",
|
||||
"limite": "Preparar proposta antes de nova autorização; preservar contratos, dados e independência dos produtos"
|
||||
}
|
||||
],
|
||||
"problema_observavel": "O produto possui capacidades funcionais verificadas, mas o carregador financeiro e vários adaptadores só aceitam APP_ENV=testing, bases descartáveis e, no bundle financeiro, um porto/identidade de cluster específicos de QA. Alterar apenas menus ou activar uma flag não produz uma instalação comercial autónoma.",
|
||||
"ambito_exacto": [
|
||||
"Promover as capacidades existentes de ciclos de aprovação/reserva, divisão/consolidação, contas por linha, custos estimados/efectivos de importação e integração financeira para contratos operacionais versionados, conservando uma única autoridade de escrita.",
|
||||
"Preparar novos artefactos distribuíveis na composição autónoma de Compras, com manifesto, hashes, versões e compatibilidade explícita; preservar integralmente os artefactos QA congelados.",
|
||||
"Substituir a dependência de nomes/portos de testes por verificação explícita da instalação própria de Compras, configuração opt-in e runtime/schema compatíveis; manter recusas para versões incompatíveis ou instalação incompleta.",
|
||||
"Preparar a disponibilidade instalável dos cadastros próprios, ordens operacionais, mínimo urgente, expiração, revisão de urgências, conflitos e auditoria privada, reutilizando as permissões e regras já aprovadas.",
|
||||
"Manter os novos recursos desligados por defeito até uma instalação/activação expressamente autorizada; nenhuma promoção concede funções a utilizadores.",
|
||||
"Ensaiar a composição operacional exclusivamente em bases QA isoladas, com dados sintéticos, incluindo migração, recuperação, arranque independente e recusa de downgrade incompatível."
|
||||
],
|
||||
"comportamento_a_demonstrar": [
|
||||
"Uma instalação de Compras com runtime e schema compatíveis pode disponibilizar os módulos configurados sem depender de uma pasta, base, cluster ou serviço SGF.",
|
||||
"Instalação não configurada, manifesto adulterado, runtime antigo com efeitos novos e schema parcial são recusados antes de efeitos.",
|
||||
"Empresas, acessos, documentos originais, cálculos, decisões e histórico conservam os seus contratos; nenhum dado sintético é transportado para o activo.",
|
||||
"Sucesso, erro, repetição, concorrência, recuperação e arranque são demonstrados com a composição distribuível e não apenas com classes carregadas da árvore de desenvolvimento."
|
||||
],
|
||||
"nao_autorizado_por_esta_decisao": [
|
||||
"Instalar, migrar ou activar o piloto, o domínio público ou produção.",
|
||||
"Alterar a instalação operacional ou os dados do SGF.",
|
||||
"Importar dados sintéticos no activo, conceder permissões reais ou mudar MFA.",
|
||||
"Executar pagamentos, transferências, JUE ou operações reais de compra/cancelamento.",
|
||||
"Publicar regras fiscais, inventar taxas/prazos/alçadas ou alterar decisões empresariais.",
|
||||
"Eliminar dados, reescrever originais ou regressar a runtime incompatível depois de efeitos novos."
|
||||
],
|
||||
"validacao_actual": {
|
||||
"frontend_integral": {
|
||||
"ficheiros": 92,
|
||||
"testes": 466,
|
||||
"resultado": "aprovado"
|
||||
},
|
||||
"ultima_compilacao_privada": "storage/framework/testing/sgc-legacy-cancellation-qa-20261129",
|
||||
"manifest_sha256": "99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be",
|
||||
"entradas": 184,
|
||||
"nota": "Não equivale a aceitação integral. Provas funcionais por módulo mantidas na matriz existente; não somar baterias sobrepostas."
|
||||
},
|
||||
"pendencias_conservadas": [
|
||||
"Confirmação nativa final de C2 interrompida pela ferramenta na leitura do URL do diálogo. Pedido e separação de funções demonstrados; aprovação não confirmada. Bases/roles removidos; não contornar o controlo.",
|
||||
"Revisão visual e impressão restantes e aceitação empresarial mantêm-se na matriz existente.",
|
||||
"Formalização de Pessoas mantém o adiamento decidido; bancos completos/Pessoas ficam fora da exportação privada autorizada."
|
||||
],
|
||||
"reversao": "Antes de qualquer instalação real, preparar proposta própria com destino exacto, backup/restauro sob identidade equivalente, alterações aditivas, conferência de conservação e estratégia de recuperação. Para esta promoção, preservar fontes e bundles anteriores; não executar migrações nem remover ficheiros operacionais.",
|
||||
"instalacao_real": {
|
||||
"destino": null,
|
||||
"autorizada": false,
|
||||
"executada": false
|
||||
},
|
||||
"efeitos_activos": false,
|
||||
"adaptadores_qa_inventariados": [
|
||||
{
|
||||
"ficheiro": "app/Services/AgreementOrderLimits.php",
|
||||
"sha256": "4bd57deba4ffc70070f8c8e9b47da6a73028e2b20674363ce826ed2fba683957"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/CapitalRegister.php",
|
||||
"sha256": "2c58b2079b70f6de1d09c4f2737225c6845e8325f50698a111a5c60ff079d678"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ConflictReleases.php",
|
||||
"sha256": "679524556aa276508891024db1cb78031093ca7eb2d767dcb3b12ae8df4a0235"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/EvaluationAccess.php",
|
||||
"sha256": "cfe72b4ecdc64ac836f1981262fa1918eb4dee08270243d44d295db7235f447d"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ExpenseAllocations.php",
|
||||
"sha256": "ccb6c719c0d67ef7a74035777aaa9a08b328c33133b3581863edfcc6219a5b90"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/FinanceBundle.php",
|
||||
"sha256": "5a0a9d7f650b494789e66d83981a67d0d9636885d8282732b3c9270a9f6e441d"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportBankSupport.php",
|
||||
"sha256": "df012e8ceae5ca74529faaa2d65b85fd249b5b65837f31bf68df8ee5c4d38917"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportDossier.php",
|
||||
"sha256": "fbf6d9226e8f9abd1ddb7b906fa51884a0bc0c0742da4aa58a233a794658e196"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportEstimates.php",
|
||||
"sha256": "f2f3ed0479c40bcfa552893a0d22f86db37361170599ecd45e3979f6277bf595"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportLandedCosts.php",
|
||||
"sha256": "eaf611811926b96a9516b1671ba8b0f3e42f70bb8b285512fcbe899b1306c449"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportLegalRules.php",
|
||||
"sha256": "d7965ed608be3a64c0dc04b959158952451cfdc2c66fc70e8ecd7af6115e4e25"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportReadiness.php",
|
||||
"sha256": "f1f379915063756841c2bc8ce7cbc97510688bfa151002d0a804d0153f57215b"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ImportTariffCodes.php",
|
||||
"sha256": "e1a1aff3b764f0e82a39ba21fa6e2efd7ac7f11c9b87148226c8e1a4a451f97a"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/OperationalOrders.php",
|
||||
"sha256": "8785904ebadc5ceef2dccbedb00378bae21b69dabb5c0773219ace1545e4fbba"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/OrderPartsPreparation.php",
|
||||
"sha256": "049487fa206a7f067c5cee4a132dbc464a268894120432ee1d10be7c93323e14"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/PrivateAuditAccess.php",
|
||||
"sha256": "6ada828ce29673edcd411bd3bf0a3e5dde2486996a0077f936dcc942a05971fb"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ReceiptQuantityConversion.php",
|
||||
"sha256": "7fac7b78f81a645b19dbef5e51b51b4cc4ac3afbe4d331e6e7a6b76073105240"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/ReceiptStockMovement.php",
|
||||
"sha256": "a9116fc3fd0ef365f2fa9fc5b8db29f8d81bb113710495eeb3997bd3885602d1"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/RequisitionAccountAssignments.php",
|
||||
"sha256": "b2fa68fe8dc02a5c4f5ad0dc7634b25a8b5a10087d05672d1230f2590216deb2"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/RequisitionApprovalLevels.php",
|
||||
"sha256": "194b1ce020a0fd2167ad773626a11afa1d42a39be1d6d9298ea6446973f37b6c"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/RequisitionBudgetDistributions.php",
|
||||
"sha256": "36684a1e1e062edec246844d90e1c1143481fa92051bc86bee591d3f5ccb6075"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/RequisitionExpiry.php",
|
||||
"sha256": "a5f8dc7d81be57c2125923583d1973a1d92c0f8861a945bbd102536da0e0d4f0"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/RequisitionLedgerAccounts.php",
|
||||
"sha256": "22f4509f2cfbedf476f815c01f9d0d9335a117eb5c60dae8c7bb27425f00f57a"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/SupplierPayables.php",
|
||||
"sha256": "756bf578b14dd6bd13d9444316d2a19c9615ce2e4f717ed539862739705e4a02"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/SupplyCoordination.php",
|
||||
"sha256": "abdf4b30f9ad79384e65106de1b3da5fb6dd2da5925fd096ec6673621ea9fca0"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/UrgentQuotationBasis.php",
|
||||
"sha256": "dd0c007e98765e40b9a06115cd373e1184947b43620455755577a7fbba1bba56"
|
||||
},
|
||||
{
|
||||
"ficheiro": "app/Services/UrgentRequisitionReviews.php",
|
||||
"sha256": "2b76ef27298b6c008b25f5b3a2477a68cd8e9fbc72d0f34c707700d22230c364"
|
||||
}
|
||||
],
|
||||
"migracoes_qa_de_referencia": [
|
||||
{
|
||||
"ficheiro": "database/qa-migrations/2026_11_22_000004_create_budget_distributions.php",
|
||||
"sha256": "ed16865e01d22eb1014ff50c3ad422860328ebf32911700891ab50ae38d853b9"
|
||||
},
|
||||
{
|
||||
"ficheiro": "database/qa-migrations/2026_11_22_000007_create_budget_order_parts.php",
|
||||
"sha256": "5e75108d6b2f8e1b519859434a50473ebd437c387223f874768b7273b1c2038e"
|
||||
},
|
||||
{
|
||||
"ficheiro": "database/qa-migrations/2026_11_22_000008_create_purchase_order_sources.php",
|
||||
"sha256": "14c88a5c04091fb742275300441955aa299191d004310f2384f1ed3ec5409242"
|
||||
},
|
||||
{
|
||||
"ficheiro": "database/qa-migrations/2026_11_22_000009_create_budget_landed_costs.php",
|
||||
"sha256": "c2b0a799157eab74da91c0c508887c7c1e80f171273f14190602ef7dbdb59828"
|
||||
},
|
||||
{
|
||||
"ficheiro": "database/qa-migrations/2026_11_27_000001_add_requisition_cycles.php",
|
||||
"sha256": "8ee8aa5b2820c57b4d53f4e0da72933f988996fffe3bf055ec8aeac9072d2983"
|
||||
}
|
||||
],
|
||||
"runtimes_qa_preservados": [
|
||||
{
|
||||
"directorio": "storage/framework/testing/requisition-ledger-runtime-qa-182e10ceec556e12",
|
||||
"manifest_sha256": "182e10ceec556e120ecb14b57d17f0132ce0b555041cb054cdf9d17bcc1d51df",
|
||||
"ficheiros_verificados": 44
|
||||
},
|
||||
{
|
||||
"directorio": "storage/framework/testing/requisition-cycles-qa-35701ec1614f871e",
|
||||
"manifest_sha256": "fe1dec59a6d619670e887fd2f972a6de176b858a90f03cf43a017c681606816a",
|
||||
"ficheiros_verificados": 24
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -85,5 +85,64 @@
|
||||
"No pilot/operational SGF installation, activation, migration, real data or permission changes",
|
||||
"Versioned legal suggestions and remaining product requirements remain open"
|
||||
],
|
||||
"execution_note": "PowerShell blocked ps1 npm/npx wrappers; cmd launchers passed without policy changes. Overlapping test counts must not be added."
|
||||
"execution_note": "PowerShell blocked ps1 npm/npx wrappers; cmd launchers passed without policy changes. Overlapping test counts must not be added.",
|
||||
"documentary_native_navigation_delta_20261129": {
|
||||
"scope": "Isolated synthetic documentary import; existing native services and permissions only",
|
||||
"fixture": {
|
||||
"new_guarded_preview_flag": "--import-documentary-preview --native-review --integrated-schema --frozen-runtime",
|
||||
"synthetic_originals": 4,
|
||||
"bank_initial_version": 1
|
||||
},
|
||||
"native_before_menu_fix": {
|
||||
"dossier_four_original_versions_and_correction_controls": true,
|
||||
"bank_link_from_dossier": true,
|
||||
"bank_documents_gathered_not_delivered": true,
|
||||
"explicit_deadline_readable": true,
|
||||
"mobile": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"bank_title_state_deadline_no_lateral_clipping": true
|
||||
},
|
||||
"menu_defect_observed": "Documentary import pages displayed generic workspace without active menu"
|
||||
},
|
||||
"fix": {
|
||||
"existing_authorised_supply_imports_entry_only": true,
|
||||
"pages": [
|
||||
"documentos",
|
||||
"documentos/18",
|
||||
"suporte-bancario",
|
||||
"acompanhamento",
|
||||
"custos"
|
||||
],
|
||||
"new_grants": false
|
||||
},
|
||||
"verification": {
|
||||
"frontend_tests": 22,
|
||||
"frontend_files": 4,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"menu_entries": 149,
|
||||
"menu_roles": 6,
|
||||
"build": true,
|
||||
"manifest_sha256": "4857fa1b45c4b082e615d76e028af2be67d177efaf93fcee46dceee99ddcbd9a",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native_after_fix": {
|
||||
"desktop_purchasing_group_active": true,
|
||||
"imports_menu_entry_highlighted": true,
|
||||
"bank_copy_revision_saved_version": 2,
|
||||
"version1_history_retained": true,
|
||||
"requirements_invoice_count": 1,
|
||||
"deadline_retained": "2026-11-28",
|
||||
"delivery_still_not_documented": true,
|
||||
"hard_reload_preserved_version2": true,
|
||||
"after_save_reload_and_close_without_false_warning": true
|
||||
},
|
||||
"cleanup": {
|
||||
"both_owned_databases_and_roles_removed": true,
|
||||
"own_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"limits": "No OS upload/date-picker entry, JUE or bank execution, printing, activation or operational installation. Mobile was reviewed before the menu-only fix; no new mobile proof after it."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,24 +11,133 @@
|
||||
"No new schema, payable, stock movement, customs release, bank or JUE execution"
|
||||
],
|
||||
"verification": {
|
||||
"sqlite_dossier_and_receipt_protocol_before_final_protocol_case": {"passed": 10, "assertions": 58},
|
||||
"postgresql_dossier_costs_health": {"passed": 28, "assertions": 192, "database_removed": true},
|
||||
"concurrency": {"blocked_writers_each_case": 2, "same_operation": [200, 200], "same_previous_version": [200, 409], "new_document_versions_each_case": 1, "new_original_files_each_case": 1, "audits_each_case": 1, "all_originals_verified": true, "database_removed": true},
|
||||
"recovery": {"previous_tables_preserved": 115, "cost_document_original_versions_restored": 2, "typed_document_original_versions_restored": 2, "source_loss_demonstrated": true, "separate_private_root_restored": true, "native_authorized_evidence_resolved": true, "sql_restored_equal": true, "replay_no_new_effects": true, "pre_extension_restored": true, "databases_removed": true},
|
||||
"frontend_integrated": {"files": 35, "passed": 162, "log": "storage/logs/frontend-integrated-20261127.txt"},
|
||||
"receipt_protocol_final": {"passed": 5, "assertions": 17},
|
||||
"sqlite_dossier_and_receipt_protocol_before_final_protocol_case": {
|
||||
"passed": 10,
|
||||
"assertions": 58
|
||||
},
|
||||
"postgresql_dossier_costs_health": {
|
||||
"passed": 28,
|
||||
"assertions": 192,
|
||||
"database_removed": true
|
||||
},
|
||||
"concurrency": {
|
||||
"blocked_writers_each_case": 2,
|
||||
"same_operation": [
|
||||
200,
|
||||
200
|
||||
],
|
||||
"same_previous_version": [
|
||||
200,
|
||||
409
|
||||
],
|
||||
"new_document_versions_each_case": 1,
|
||||
"new_original_files_each_case": 1,
|
||||
"audits_each_case": 1,
|
||||
"all_originals_verified": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"recovery": {
|
||||
"previous_tables_preserved": 115,
|
||||
"cost_document_original_versions_restored": 2,
|
||||
"typed_document_original_versions_restored": 2,
|
||||
"source_loss_demonstrated": true,
|
||||
"separate_private_root_restored": true,
|
||||
"native_authorized_evidence_resolved": true,
|
||||
"sql_restored_equal": true,
|
||||
"replay_no_new_effects": true,
|
||||
"pre_extension_restored": true,
|
||||
"databases_removed": true
|
||||
},
|
||||
"frontend_integrated": {
|
||||
"files": 35,
|
||||
"passed": 162,
|
||||
"log": "storage/logs/frontend-integrated-20261127.txt"
|
||||
},
|
||||
"receipt_protocol_final": {
|
||||
"passed": 5,
|
||||
"assertions": 17
|
||||
},
|
||||
"typescript": "passed",
|
||||
"phpstan": "passed_zero_errors",
|
||||
"scoped_format_lint": "passed",
|
||||
"private_build": {"path": "storage/framework/testing/sgc-import-dossier-qa-20261127", "manifest_sha256": "63f58b44aef3aacbe9761004b4542c98dfe1ee3937be48e037295dd6c7ad05f8"},
|
||||
"private_build": {
|
||||
"path": "storage/framework/testing/sgc-import-dossier-qa-20261127",
|
||||
"manifest_sha256": "63f58b44aef3aacbe9761004b4542c98dfe1ee3937be48e037295dd6c7ad05f8"
|
||||
},
|
||||
"counts_overlap_do_not_sum": true
|
||||
},
|
||||
"own_verification_corrections": [
|
||||
"Recovery now requires four private originals including both typed dossier versions; protocol regression rejects a receipt missing typed recovery",
|
||||
"Invalid original tests assert the HTTP 422 behaviour rather than one internal exception class"
|
||||
],
|
||||
"remaining": ["Broker/forwarder selection and conflict integration", "Pre-document landed-cost estimate and approval/budget integration", "Versioned legal rules and remaining import alerts/bank-support workflow", "Native visual/mobile/print review", "Operational preparation and specific target authorization", "Remaining application requirements"],
|
||||
"remaining": [
|
||||
"Broker/forwarder selection and conflict integration",
|
||||
"Pre-document landed-cost estimate and approval/budget integration",
|
||||
"Versioned legal rules and remaining import alerts/bank-support workflow",
|
||||
"Native visual/mobile/print review",
|
||||
"Operational preparation and specific target authorization",
|
||||
"Remaining application requirements"
|
||||
],
|
||||
"qa_flag_default": false,
|
||||
"pilot_or_sgf_installation_activation": false,
|
||||
"published_assets_changed": false
|
||||
"published_assets_changed": false,
|
||||
"documentary_native_navigation_delta_20261129": {
|
||||
"scope": "Isolated synthetic documentary import; existing native services and permissions only",
|
||||
"fixture": {
|
||||
"new_guarded_preview_flag": "--import-documentary-preview --native-review --integrated-schema --frozen-runtime",
|
||||
"synthetic_originals": 4,
|
||||
"bank_initial_version": 1
|
||||
},
|
||||
"native_before_menu_fix": {
|
||||
"dossier_four_original_versions_and_correction_controls": true,
|
||||
"bank_link_from_dossier": true,
|
||||
"bank_documents_gathered_not_delivered": true,
|
||||
"explicit_deadline_readable": true,
|
||||
"mobile": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"bank_title_state_deadline_no_lateral_clipping": true
|
||||
},
|
||||
"menu_defect_observed": "Documentary import pages displayed generic workspace without active menu"
|
||||
},
|
||||
"fix": {
|
||||
"existing_authorised_supply_imports_entry_only": true,
|
||||
"pages": [
|
||||
"documentos",
|
||||
"documentos/18",
|
||||
"suporte-bancario",
|
||||
"acompanhamento",
|
||||
"custos"
|
||||
],
|
||||
"new_grants": false
|
||||
},
|
||||
"verification": {
|
||||
"frontend_tests": 22,
|
||||
"frontend_files": 4,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"menu_entries": 149,
|
||||
"menu_roles": 6,
|
||||
"build": true,
|
||||
"manifest_sha256": "4857fa1b45c4b082e615d76e028af2be67d177efaf93fcee46dceee99ddcbd9a",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native_after_fix": {
|
||||
"desktop_purchasing_group_active": true,
|
||||
"imports_menu_entry_highlighted": true,
|
||||
"bank_copy_revision_saved_version": 2,
|
||||
"version1_history_retained": true,
|
||||
"requirements_invoice_count": 1,
|
||||
"deadline_retained": "2026-11-28",
|
||||
"delivery_still_not_documented": true,
|
||||
"hard_reload_preserved_version2": true,
|
||||
"after_save_reload_and_close_without_false_warning": true
|
||||
},
|
||||
"cleanup": {
|
||||
"both_owned_databases_and_roles_removed": true,
|
||||
"own_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"limits": "No OS upload/date-picker entry, JUE or bank execution, printing, activation or operational installation. Mobile was reviewed before the menu-only fix; no new mobile proof after it."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,5 +136,145 @@
|
||||
"pending_delivery_and_due_today_alerts_removed": true,
|
||||
"isolated_environment_removed": true,
|
||||
"bank_execution": false
|
||||
},
|
||||
"specific_rate_precision_delta_20261128": {
|
||||
"status": "implemented_in_qa_no_real_rates_activated",
|
||||
"coefficient": "Exact decimal minor-unit coefficient, up to six decimal places; monetary results remain integer minor units",
|
||||
"float_coefficients_rejected": true,
|
||||
"sqlite": {
|
||||
"tests": 15,
|
||||
"assertions": 138,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql": {
|
||||
"tests": 61,
|
||||
"assertions": 988,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 23,
|
||||
"files": 3,
|
||||
"passed": true
|
||||
},
|
||||
"checks": {
|
||||
"types": true,
|
||||
"phpstan": true,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"build": true
|
||||
},
|
||||
"initial_failure": "Installed BigDecimal API uses strippedOfTrailingZeros; corrected and regression cases passed",
|
||||
"native_history_decimal_recovery": true,
|
||||
"native_decimal_draft_save_demonstrated": false,
|
||||
"financial_writer_changed": false,
|
||||
"build_manifest_sha256": "9d415ba790aa602b36372d310a4eaa3426670fc521f15efb4166d782e170ac8e"
|
||||
},
|
||||
"specific_coefficient_native_save_delta_20261129": {
|
||||
"status": "native_save_reload_and_mobile_verified_in_isolated_qa",
|
||||
"setup": "Existing guarded specific-rate preview now prepares a synthetic source and draft through the native service with valid illustrative dates, avoiding the previously blocked OS upload/date selection front. No actual legal rate is seeded or published.",
|
||||
"record_key": "651c6f2f-bd2b-440e-948a-fbc8ff88ae36",
|
||||
"initial_version": 1,
|
||||
"saved_version": 2,
|
||||
"saved_state": "draft",
|
||||
"coefficient_mzn": "0.0099",
|
||||
"coefficient_minor": "0.99",
|
||||
"quantity_unit": "g",
|
||||
"native": {
|
||||
"copied_existing_version": true,
|
||||
"typed_exact_coefficient": true,
|
||||
"entered_reason": true,
|
||||
"clicked_save_preparation": true,
|
||||
"server_version2_visible": true,
|
||||
"hard_reload_preserved_exact_coefficient": true,
|
||||
"hard_reload_without_dirty_prompt_after_save": true,
|
||||
"mobile_width": 390,
|
||||
"mobile_height": 526,
|
||||
"version2_draft_dates_and_coefficient_readable": true,
|
||||
"tab_closed_without_beforeunload": true
|
||||
},
|
||||
"dirty_guard": "All legal preparation forms now reuse the already verified common managed preparation hook, including early restored forms.",
|
||||
"verification": {
|
||||
"frontend": 23,
|
||||
"files": 3,
|
||||
"types": true,
|
||||
"scoped_format_lint": true,
|
||||
"build": true
|
||||
},
|
||||
"manifest_sha256": "2ede33b27c22e64f2f5d963e1436308f4d2fa6ed78b7484da92082624e4e7600",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"publication_or_calculation_activated": false,
|
||||
"operational_changes": false,
|
||||
"limits": "The native saved value is confirmed by the version-2 summary after reload. OS file selection and date picker entry were not exercised; the prior limitation is superseded only for saving this existing draft. No real tax validity or full application acceptance is claimed."
|
||||
},
|
||||
"vat_documentary_delta_20261129": {
|
||||
"status": "implemented_in_isolated_qa_not_legal_consolidation_or_product_completion",
|
||||
"source": {
|
||||
"file": "alteracao CIVA 2023.pdf",
|
||||
"sha256": "0c13f4b03dadea7f2dfe30694650078fa7b9de00ef84cb47389422d23a5271cd",
|
||||
"law": "Lei 22/2022",
|
||||
"citation": "Article 1, CIVA Article 17(1), BR I Serie 250 page 2238; commencement Article 6 page 2239",
|
||||
"rate_percent": 16,
|
||||
"valid_from": "2023-01-01",
|
||||
"valid_until": null
|
||||
},
|
||||
"behavior": {
|
||||
"templates_added": 1,
|
||||
"internal_selector_identifier_not_used_as_tariff_code": true,
|
||||
"match_and_suggested_codes_blank": true,
|
||||
"vat_basis_blank_requires_explicit_completion": true,
|
||||
"other_three_impositions_unknown": true,
|
||||
"source_bytes_verified_before_template": true,
|
||||
"no_automatic_publication_or_calculation": true
|
||||
},
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 4,
|
||||
"assertions": 231
|
||||
},
|
||||
"postgresql_frozen": {
|
||||
"tests": 12,
|
||||
"assertions": 289,
|
||||
"database_and_role_removed": true
|
||||
},
|
||||
"frontend_final": {
|
||||
"tests": 28,
|
||||
"files": 3
|
||||
},
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"templates_expected": 49,
|
||||
"vat_source_id": 18,
|
||||
"selected_vat_source": true,
|
||||
"rate_and_commencement_confirmed": true,
|
||||
"codes_and_basis_blank_confirmed": true,
|
||||
"incomplete_save_blocked_by_browser_required_code": true,
|
||||
"original_invalid_field_hidden_by_fixed_header": true,
|
||||
"corrected_first_invalid_field_scrolled_to_center_and_visibly_confirmed": true,
|
||||
"preparation_discarded_without_save": true,
|
||||
"no_mobile_delta": true,
|
||||
"no_native_successful_save_claim": true,
|
||||
"qa_previews_removed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"private_manifest_sha256": "084b3d39114f9e7a4b5307c2242bbf98a1add5ae17251c1a6f515866cfb1ecfe",
|
||||
"limits": [
|
||||
"2016 Article 16 import valuation visually researched separately; no automatic base formula implemented",
|
||||
"Later 2025 amendments reviewed only for this documentary scope, no complete legal consolidation claimed",
|
||||
"Native validation covers browser missing-code rejection; missing-basis rejection and explicit synthetic draft save covered by backend tests",
|
||||
"No pilot, SGF, actual source, rights, bank or financial operational change"
|
||||
],
|
||||
"mistargeted_check": "Earlier quotation-exchange runner call selected unrelated FX suite because the outer landed-cost mode was absent; excluded as VAT evidence; correct frozen legal-reference runner passed afterward."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,5 +310,170 @@
|
||||
"manifest_sha256": "8a30171b051303e1df299157cea7684c5276846560c9b42c8c782b2ed89dc272",
|
||||
"entries": 183
|
||||
}
|
||||
},
|
||||
"ice_second_supplement_delta_20261128": {
|
||||
"status": "implemented_in_isolated_qa_not_installed_no_real_rule_activation",
|
||||
"source": {
|
||||
"origin": "Official Autoridade Tributaria endpoint, separately acquired for this implementation; not included in the earlier owner-corpus inventory",
|
||||
"url": "https://www.at.gov.mz/api/webdav?path=%2FLEGISLA%C3%87%C3%83O%2FLEGISLA%C3%87%C3%83O+ADUANEIRA%2FLEI%2FBR_248_I_SERIE_2%C2%BA+SUPLEMENTO_2025_260116_124640.pdf",
|
||||
"local_original": "tmp/pdfs/import-legal-source-review-20261128/law7-2025-official-second-supplement.pdf",
|
||||
"sha256": "9b10862f60ed87ec42d4f42f3cae42e17580eb761e4b7673bd8d8225691c4de4",
|
||||
"bytes": 380932,
|
||||
"pages": 2,
|
||||
"table_page": "2180-(22)",
|
||||
"visually_reviewed": true,
|
||||
"signature_validation_claimed": false
|
||||
},
|
||||
"documentary_findings": [
|
||||
"Second supplement contains eleven exact ICE positions with explicit 2026 and 2027 column",
|
||||
"Article 6 states commencement on 2026-01-01",
|
||||
"Footnote renders the previous first-supplement publication of Law 7/2025 without effect; no inference that Law 8/2025 is withdrawn",
|
||||
"Livre is recorded as explicit zero ICE ad valorem with documentary label; other charges remain unknown"
|
||||
],
|
||||
"scope": [
|
||||
"Exact hash plus actual original-byte verification",
|
||||
"Eleven selectable editable proposals only; no automatic source combination or classification",
|
||||
"Explicit end of template period 2027-12-31 preserved by UI and draft save",
|
||||
"Unchanged native rule versioning, publication and financial writers"
|
||||
],
|
||||
"sqlite": {
|
||||
"tests": 11,
|
||||
"assertions": 260,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql": {
|
||||
"initial_group_timeout": true,
|
||||
"timeout_seconds": 180,
|
||||
"timeout_cause_not_proven": true,
|
||||
"isolated_delta": {
|
||||
"tests": 1,
|
||||
"assertions": 166,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"final_group": {
|
||||
"tests": 11,
|
||||
"assertions": 260,
|
||||
"passed": true,
|
||||
"database_removed": true
|
||||
},
|
||||
"failed_database_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 24,
|
||||
"files": 3,
|
||||
"passed": true,
|
||||
"final_fixture_consistency_delta": {
|
||||
"tests": 7,
|
||||
"passed": true,
|
||||
"overlaps_group": true
|
||||
}
|
||||
},
|
||||
"checks": {
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"diff_check": true
|
||||
},
|
||||
"build": {
|
||||
"directory": "storage/framework/testing/sgc-ice-reference-qa-20261128",
|
||||
"manifest_sha256": "053dbe4447c70105fe6ba67c68e4d381034884fb10a422ae9cc612e244e5c6c9",
|
||||
"entries": 183,
|
||||
"missing": 0
|
||||
},
|
||||
"native": {
|
||||
"route": "/requisicoes/1/base-legal",
|
||||
"source_id": 18,
|
||||
"code": "8703.80.10",
|
||||
"rate_percent": "5",
|
||||
"version": 1,
|
||||
"state": "draft",
|
||||
"period": [
|
||||
"2026-01-01",
|
||||
"2027-12-31"
|
||||
],
|
||||
"saved": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"rule_published": false,
|
||||
"calculation_activated": false,
|
||||
"real_business_operation": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"remaining": [
|
||||
"Other ICE positions outside this annex and the broader legal corpus remain separately scoped",
|
||||
"VAT and other charges are not inferred by these ICE proposals",
|
||||
"No integral product acceptance or pilot deployment"
|
||||
]
|
||||
},
|
||||
"vat_documentary_delta_20261129": {
|
||||
"status": "implemented_in_isolated_qa_not_legal_consolidation_or_product_completion",
|
||||
"source": {
|
||||
"file": "alteracao CIVA 2023.pdf",
|
||||
"sha256": "0c13f4b03dadea7f2dfe30694650078fa7b9de00ef84cb47389422d23a5271cd",
|
||||
"law": "Lei 22/2022",
|
||||
"citation": "Article 1, CIVA Article 17(1), BR I Serie 250 page 2238; commencement Article 6 page 2239",
|
||||
"rate_percent": 16,
|
||||
"valid_from": "2023-01-01",
|
||||
"valid_until": null
|
||||
},
|
||||
"behavior": {
|
||||
"templates_added": 1,
|
||||
"internal_selector_identifier_not_used_as_tariff_code": true,
|
||||
"match_and_suggested_codes_blank": true,
|
||||
"vat_basis_blank_requires_explicit_completion": true,
|
||||
"other_three_impositions_unknown": true,
|
||||
"source_bytes_verified_before_template": true,
|
||||
"no_automatic_publication_or_calculation": true
|
||||
},
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 4,
|
||||
"assertions": 231
|
||||
},
|
||||
"postgresql_frozen": {
|
||||
"tests": 12,
|
||||
"assertions": 289,
|
||||
"database_and_role_removed": true
|
||||
},
|
||||
"frontend_final": {
|
||||
"tests": 28,
|
||||
"files": 3
|
||||
},
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"templates_expected": 49,
|
||||
"vat_source_id": 18,
|
||||
"selected_vat_source": true,
|
||||
"rate_and_commencement_confirmed": true,
|
||||
"codes_and_basis_blank_confirmed": true,
|
||||
"incomplete_save_blocked_by_browser_required_code": true,
|
||||
"original_invalid_field_hidden_by_fixed_header": true,
|
||||
"corrected_first_invalid_field_scrolled_to_center_and_visibly_confirmed": true,
|
||||
"preparation_discarded_without_save": true,
|
||||
"no_mobile_delta": true,
|
||||
"no_native_successful_save_claim": true,
|
||||
"qa_previews_removed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"private_manifest_sha256": "084b3d39114f9e7a4b5307c2242bbf98a1add5ae17251c1a6f515866cfb1ecfe",
|
||||
"limits": [
|
||||
"2016 Article 16 import valuation visually researched separately; no automatic base formula implemented",
|
||||
"Later 2025 amendments reviewed only for this documentary scope, no complete legal consolidation claimed",
|
||||
"Native validation covers browser missing-code rejection; missing-basis rejection and explicit synthetic draft save covered by backend tests",
|
||||
"No pilot, SGF, actual source, rights, bank or financial operational change"
|
||||
],
|
||||
"mistargeted_check": "Earlier quotation-exchange runner call selected unrelated FX suite because the outer landed-cost mode was absent; excluded as VAT evidence; correct frozen legal-reference runner passed afterward."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,5 +109,56 @@
|
||||
"mfa_enabled": false,
|
||||
"sgf_changes": false,
|
||||
"visual_review": false,
|
||||
"documentation": "docs/cancelamento-ordens-emitidas.md"
|
||||
"documentation": "docs/cancelamento-ordens-emitidas.md",
|
||||
"native_legacy_cancellation_delta_20261129": {
|
||||
"status": "Legacy presentation fixed; native cancellation cycle partially demonstrated, final decision not confirmed",
|
||||
"manifest_sha256": "99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be",
|
||||
"change": "Incomplete historical order branch now renders the same server-authorised operational/cancellation component as complete orders. Original unknown fields remain unknown; no authority or business command changed.",
|
||||
"tests": {
|
||||
"frontend": 18,
|
||||
"files": 2,
|
||||
"types": "passed",
|
||||
"scoped_lint_format": "passed",
|
||||
"build": "passed",
|
||||
"syntax_pint_node": "passed"
|
||||
},
|
||||
"native": {
|
||||
"initial_omission_observed": true,
|
||||
"corrected_legacy_operational_panel_visible": true,
|
||||
"request_submitted_by_independent_buyer": true,
|
||||
"reason_and_support_preserved": true,
|
||||
"author_has_no_decision_command": true,
|
||||
"source_shows_pending_execution_hold": true,
|
||||
"finance_independent_login": true,
|
||||
"empty_decision_reason_refused": true,
|
||||
"approved_option_selected": true,
|
||||
"reason_entered": true,
|
||||
"final_confirmation_not_observed": true,
|
||||
"final_approval_not_confirmed": true
|
||||
},
|
||||
"limitation": "Computer Use stopped the turn because it could not determine the current browser URL with enough confidence to enforce policy. No further CUA calls or confirmation were attempted.",
|
||||
"conservation": "Mandatory final worker did not pass because approved cancellation was not present. This is not proof of a completed decision. Source is explicitly an uncontrolled legacy synthetic fixture, not a controlled financial reversal test.",
|
||||
"cleanup": {
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true,
|
||||
"operational_changes": false,
|
||||
"owned_browser_tab_or_confirmation_closure_not_verified": true
|
||||
},
|
||||
"remaining": "Resume native finance decision in a fresh isolated preview; then verify final original/financial/stock conservation and mobile/print. Whole application not complete."
|
||||
},
|
||||
"native_cancellation_confirmation_retry_20261129": {
|
||||
"status": "Second native confirmation observation blocked; no final approval confirmed",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-d47853ee7606",
|
||||
"manifest_sha256": "99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be",
|
||||
"progress": "Old confirmation was visibly cancelled and the old synthetic preparation discarded; original tab preserved. New request submitted with synthetic reason/support, separate Finance login, approval option and reason prepared.",
|
||||
"alternative_observation": "Fresh screenshot established URL and identity before the action; combined accessibility-and-screenshot observation still caused the tool to stop at the native confirmation.",
|
||||
"result": "Did not accept confirmation or claim a recorded decision. Stopped this UI front after repeated URL-confidence block; did not use another interface to execute the blocked decision.",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_or_dialog_closure_not_verified": true
|
||||
},
|
||||
"final_worker": "Refused because native approved cancellation absent. Not a passing complete-cycle conservation proof.",
|
||||
"operational_changes": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,38 @@
|
||||
{
|
||||
"checked_at": "2026-10-30T17:30:57.094Z",
|
||||
"checked_at": "2026-11-28T23:03:11.076Z",
|
||||
"result": "passed",
|
||||
"entries": 111,
|
||||
"entries": 149,
|
||||
"roles": 6,
|
||||
"configurable_permissions_and_multiple_profiles": true,
|
||||
"optional_capital_register_reading_roles": [
|
||||
"admin",
|
||||
"procurement",
|
||||
"finance",
|
||||
"department_head",
|
||||
"warehouse"
|
||||
],
|
||||
"maximum_functional_groups": 6,
|
||||
"source": "procurementNavigation compared with actual Laravel GET routes",
|
||||
"scope": "Menu routing, active entry and visibility contract; not a substitute for functional or visual workflow acceptance",
|
||||
"rows": [
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
@@ -39,7 +64,7 @@
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -62,6 +87,15 @@
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
@@ -98,6 +132,60 @@
|
||||
"action": "App\\Http\\Controllers\\PurchaseControlController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_agreements",
|
||||
"label": "Fornecimento habitual",
|
||||
"path": "/compras/fornecimento?view=agreements",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_calendar",
|
||||
"label": "Reposição e calendário",
|
||||
"path": "/compras/fornecimento?view=calendar",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_suggestions",
|
||||
"label": "Sugestões de reposição",
|
||||
"path": "/compras/fornecimento?view=suggestions",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_alternatives",
|
||||
"label": "Alternativas técnicas",
|
||||
"path": "/compras/fornecimento?view=alternatives",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_deliveries",
|
||||
"label": "Entregas confirmadas",
|
||||
"path": "/compras/fornecimento?view=deliveries",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
"id": "supply_imports",
|
||||
"label": "Importações",
|
||||
"path": "/compras/fornecimento?view=imports",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Compras",
|
||||
@@ -116,6 +204,15 @@
|
||||
"action": "App\\Http\\Controllers\\SupplierEvaluationController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Pessoas e contratações",
|
||||
"id": "people_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/pessoas/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@people",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Pessoas e contratações",
|
||||
@@ -152,6 +249,15 @@
|
||||
"action": "App\\Http\\Controllers\\PeopleHiringController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Pessoas e contratações",
|
||||
"id": "people_reports",
|
||||
"label": "Relatórios de pessoas e contratações",
|
||||
"path": "/pessoas/relatorios",
|
||||
"action": "App\\Http\\Controllers\\PeopleReportController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
@@ -161,6 +267,69 @@
|
||||
"action": "App\\Http\\Controllers\\GoodsReceiptController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "supply_reservations",
|
||||
"label": "Reservas de necessidades",
|
||||
"path": "/compras/fornecimento?view=reservations",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "supply_history",
|
||||
"label": "Histórico de consumo",
|
||||
"path": "/compras/fornecimento?view=history",
|
||||
"action": "App\\Http\\Controllers\\SupplyPlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_availability",
|
||||
"label": "Disponibilidade para requisições",
|
||||
"path": "/stock/disponibilidade",
|
||||
"action": "App\\Http\\Controllers\\WarehouseAvailabilityController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_replenishment",
|
||||
"label": "Reposição automática",
|
||||
"path": "/stock/reposicao",
|
||||
"action": "App\\Http\\Controllers\\AutomaticPurchaseController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_pilot",
|
||||
"label": "Preparação do piloto",
|
||||
"path": "/stock/piloto",
|
||||
"action": "App\\Http\\Controllers\\WarehousePilotController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_requests",
|
||||
"label": "Requisições ao armazém",
|
||||
"path": "/stock/requisicoes",
|
||||
"action": "App\\Http\\Controllers\\WarehouseRequestController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "inventory_lots",
|
||||
"label": "Lotes, validade e quarentena",
|
||||
"path": "/stock/lotes",
|
||||
"action": "App\\Http\\Controllers\\InventoryLotController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
@@ -170,6 +339,15 @@
|
||||
"action": "App\\Http\\Controllers\\StockController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
"id": "inventory_dispositions",
|
||||
"label": "Devoluções e correcções",
|
||||
"path": "/stock/ocorrencias",
|
||||
"action": "App\\Http\\Controllers\\InventoryDispositionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "admin",
|
||||
"group": "Armazém e activos",
|
||||
@@ -296,6 +474,24 @@
|
||||
"action": "App\\Http\\Controllers\\SupplierPayablesController@page",
|
||||
"full_page": true
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
@@ -327,7 +523,7 @@
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -350,6 +546,15 @@
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Compras",
|
||||
@@ -413,6 +618,15 @@
|
||||
"action": "App\\Http\\Controllers\\GoodsReceiptController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_availability",
|
||||
"label": "Disponibilidade para requisições",
|
||||
"path": "/stock/disponibilidade",
|
||||
"action": "App\\Http\\Controllers\\WarehouseAvailabilityController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "procurement",
|
||||
"group": "Armazém e activos",
|
||||
@@ -476,6 +690,24 @@
|
||||
"action": "App\\Http\\Controllers\\SupplierImprovementReportController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
@@ -507,7 +739,7 @@
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -530,6 +762,15 @@
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Compras",
|
||||
@@ -593,6 +834,15 @@
|
||||
"action": "App\\Http\\Controllers\\GoodsReceiptController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_availability",
|
||||
"label": "Disponibilidade para requisições",
|
||||
"path": "/stock/disponibilidade",
|
||||
"action": "App\\Http\\Controllers\\WarehouseAvailabilityController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "finance",
|
||||
"group": "Armazém e activos",
|
||||
@@ -692,6 +942,24 @@
|
||||
"action": "App\\Http\\Controllers\\SupplierPayablesController@page",
|
||||
"full_page": true
|
||||
},
|
||||
{
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
@@ -723,7 +991,7 @@
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -746,6 +1014,15 @@
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "department_head",
|
||||
"group": "Compras",
|
||||
@@ -845,6 +1122,24 @@
|
||||
"action": "App\\Http\\Controllers\\SupplierImprovementReportController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
@@ -876,7 +1171,7 @@
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -890,6 +1185,15 @@
|
||||
"action": "App\\Http\\Controllers\\PurchasePlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Compras",
|
||||
@@ -908,6 +1212,15 @@
|
||||
"action": "App\\Http\\Controllers\\GoodsReceiptController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Armazém e activos",
|
||||
"id": "warehouse_availability",
|
||||
"label": "Disponibilidade para requisições",
|
||||
"path": "/stock/disponibilidade",
|
||||
"action": "App\\Http\\Controllers\\WarehouseAvailabilityController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Armazém e activos",
|
||||
@@ -917,6 +1230,15 @@
|
||||
"action": "App\\Http\\Controllers\\StockController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Armazém e activos",
|
||||
"id": "inventory_dispositions",
|
||||
"label": "Devoluções e correcções",
|
||||
"path": "/stock/ocorrencias",
|
||||
"action": "App\\Http\\Controllers\\InventoryDispositionController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "warehouse",
|
||||
"group": "Armazém e activos",
|
||||
@@ -944,6 +1266,24 @@
|
||||
"action": "App\\Http\\Controllers\\ConflictDeclarationController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
"id": "my_workflow_tasks",
|
||||
"label": "As minhas tarefas",
|
||||
"path": "/requisicoes/tarefas",
|
||||
"action": "App\\Http\\Controllers\\WorkflowTaskInboxController@procurement",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
"id": "process_search",
|
||||
"label": "Pesquisar processos",
|
||||
"path": "/compras/pesquisa",
|
||||
"action": "App\\Http\\Controllers\\ProcurementSearchController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
@@ -975,7 +1315,7 @@
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
"id": "all_requests",
|
||||
"label": "Todas as autorizadas",
|
||||
"label": "Requisições autorizadas",
|
||||
"path": "/requisicoes?view=all",
|
||||
"action": "App\\Http\\Controllers\\RequisitionController@index",
|
||||
"full_page": false
|
||||
@@ -989,6 +1329,15 @@
|
||||
"action": "App\\Http\\Controllers\\PurchasePlanningController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
"id": "workflow_notices",
|
||||
"label": "Avisos de aprovação",
|
||||
"path": "/requisicoes/avisos",
|
||||
"action": "App\\Http\\Controllers\\WorkflowNoticeController@index",
|
||||
"full_page": false
|
||||
},
|
||||
{
|
||||
"role": "requester",
|
||||
"group": "Compras",
|
||||
@@ -1007,5 +1356,161 @@
|
||||
"action": "App\\Http\\Controllers\\ConflictDeclarationController@index",
|
||||
"full_page": false
|
||||
}
|
||||
],
|
||||
"supply_contract_navigation_delta_20261129": {
|
||||
"scope": "Supply menu context and contract presentation only, existing access and workflows preserved",
|
||||
"menu": {
|
||||
"aliases": [
|
||||
"/compras/fornecimento with default/agreements/contracts view",
|
||||
"/compras/acordos/vigencia including contract query"
|
||||
],
|
||||
"destination": "supply_agreements",
|
||||
"requires_existing_authorised_entry": true,
|
||||
"search_terms": [
|
||||
"acordos",
|
||||
"contratos",
|
||||
"vigencia"
|
||||
],
|
||||
"no_new_route_or_grant": true
|
||||
},
|
||||
"presentation": {
|
||||
"contract_preparation_label": "Novo contrato com v?rios artigos",
|
||||
"card_title_uses_escaped_documentary_reference": true,
|
||||
"missing_reference_explicit": true,
|
||||
"navigation_semantic_group_wraps_with_spacing": true
|
||||
},
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 39,
|
||||
"files": 4,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"vigency_contract_option_highlight_visually_confirmed": true,
|
||||
"search_contracts_one_existing_authorised_destination": true,
|
||||
"return_to_contracts_link_opened": true,
|
||||
"final_contract_label_and_reference_and_link_spacing_confirmed": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"no_mobile_delta": true,
|
||||
"mobile_block": "Two attempts to open device tools did not produce an observable tool panel; this front stopped without claiming mobile coverage",
|
||||
"previews_removed": true,
|
||||
"user_original_tab_preserved": true
|
||||
},
|
||||
"manifests": {
|
||||
"menu_review": "70742eeb2d6416d605fda0db496b417728262740adda9d8a11d4aefac1b7d7e2",
|
||||
"final_contract_review": "872018a819feaff11a0d30a7592246e435171470de01499efd30010e65fc60f9"
|
||||
},
|
||||
"operational_changes": false,
|
||||
"full_product_complete": false
|
||||
},
|
||||
"native_narrow_window_navigation_delta_20261129": {
|
||||
"scope": "Native independent narrow-window alternative after unavailable device tools, not 390px emulation",
|
||||
"manifest_sha256": "c4d051ccb0f5de3f52f101d0f0256eb993f42e48e8f14ea7afb5fa4dbd60299c",
|
||||
"native": {
|
||||
"browser": "Edge separate owned window",
|
||||
"outer_window_image_width_px": 502,
|
||||
"outer_window_image_height_px": 998,
|
||||
"css_viewport_width_not_measured": true,
|
||||
"original_window_bounds_unchanged": true,
|
||||
"closed_disclosure_observed": true,
|
||||
"all_five_section_links_single_column_readable": true,
|
||||
"response_anchor_title_below_header": true,
|
||||
"response_content_readable_without_observed_lateral_cut": true,
|
||||
"adapted_menu_opens_and_fits": true,
|
||||
"contract_search_returns_existing_supply_destination": true,
|
||||
"selecting_result_closes_menu_and_opens_agreements": true,
|
||||
"linked_contract_workspace_labels_reference_and_separated_links_readable": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"owned_window_closed_and_original_windows_inventory_preserved": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": [
|
||||
"This supersedes lack of narrow-window evidence only for the described views",
|
||||
"390px device emulation remains unverified in this delta",
|
||||
"Earlier historical 390px proofs retain their original scope"
|
||||
]
|
||||
},
|
||||
"native_mobile_navigation_completion_delta_20261129": {
|
||||
"status": "Native responsive review passed",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-17db8e4d1176",
|
||||
"viewport": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"scale_percent": 100
|
||||
},
|
||||
"evaluation": {
|
||||
"closed_by_default": true,
|
||||
"five_links_single_column": true,
|
||||
"improvements_heading_below_sticky_header": true,
|
||||
"response_heading_below_sticky_header": true,
|
||||
"approved_version_3_preserved": true
|
||||
},
|
||||
"contracts": {
|
||||
"menu_search": "contratos",
|
||||
"single_existing_destination": "Fornecimento habitual",
|
||||
"adapted_drawer_closes_after_navigation": true,
|
||||
"agreements_to_contracts_link_followed": true,
|
||||
"header_links_separated_and_wrapped": true,
|
||||
"new_label": "Novo contrato com vários artigos",
|
||||
"document_title": "Contrato QA-VISUAL-CONTRACT",
|
||||
"readable_without_horizontal_page_overflow": true
|
||||
},
|
||||
"urgent_deadline": {
|
||||
"route": "/requisicoes/6/prazos",
|
||||
"configured_synthetic_minutes": 5,
|
||||
"stage_started_local": "29/11/2026 04:12:15",
|
||||
"expires_local": "29/11/2026 04:17:15",
|
||||
"reduced_urgency_explanation_visible": true,
|
||||
"no_deadline_command_executed": true,
|
||||
"no_stock_minimum_reduction_test_in_this_pass": true
|
||||
},
|
||||
"cleanup": {
|
||||
"old_orphan_owned_window_closed": true,
|
||||
"new_owned_tools_and_window_closed": true,
|
||||
"original_windows_preserved": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Responsive emulation, not physical phone acceptance; responsibility copy issue observed separately and corrected after this preview."
|
||||
},
|
||||
"quotation_context_navigation_delta_20261129": {
|
||||
"status": "Implemented and natively reviewed",
|
||||
"manifest_sha256": "4b9768dc7b006e8fd6454f31c59b0d81e0e1a69454b1c4f5eb92b899a71e5ccf",
|
||||
"change": "Adjudication stays directly visible; seven related stages/documents grouped in a disclosure closed by default, two columns desktop and one mobile. Conditional urgent stock destination unchanged. Navigation hidden in print.",
|
||||
"tests": {
|
||||
"frontend": 14,
|
||||
"files": 3,
|
||||
"types": "passed",
|
||||
"scoped_lint_format": "passed",
|
||||
"build": "passed",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native": {
|
||||
"desktop_closed_and_open": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"seven_links_readable": true,
|
||||
"source_request_link_followed": true,
|
||||
"correct_request_number": "REQ-2026-000003",
|
||||
"source_still_approved_version_3": true,
|
||||
"no_saves": true
|
||||
},
|
||||
"cleanup": {
|
||||
"database_and_role_removed": true,
|
||||
"owned_tab_and_tools_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "No native urgency-link test in this preview; component test covers its original condition. Does not certify whole application acceptance."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,5 +99,769 @@
|
||||
"own_tab_closed_original_user_tab_preserved": true
|
||||
},
|
||||
"scope": "Presentation only, in QA; no new entitlement or operational publication."
|
||||
},
|
||||
"menu_dashboard_delta_20261128": {
|
||||
"status": "implemented_verified_in_isolated_qa_not_integral_product_completion",
|
||||
"scope": [
|
||||
"Direct desktop results over existing authorised menu entries only",
|
||||
"Accents, word order and domain synonyms",
|
||||
"Stable desktop groups, mobile filtering and close on navigation",
|
||||
"Tasks first, supply and import sections",
|
||||
"Dashboard links to pending and approved lists and separate personal decisions",
|
||||
"Contextual empty requisition lists"
|
||||
],
|
||||
"frontend": {
|
||||
"tests": 37,
|
||||
"files": 4,
|
||||
"passed": true,
|
||||
"note": "35 tests in four files, then two additional empty-list regression cases passed in the dashboard file; overlapping reruns not summed."
|
||||
},
|
||||
"route_contract": {
|
||||
"entries": 149,
|
||||
"legacy_roles": 6,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": {
|
||||
"directory": "storage/framework/testing/sgc-menu-dashboard-final-qa-20261128",
|
||||
"manifest_sha256": "eb7ed10cf3ad82864b875964041fbc0cda4b4d43b5ec155f0bb146f4eb460136",
|
||||
"entries": 183,
|
||||
"missing": 0
|
||||
},
|
||||
"native": {
|
||||
"first_build": "f22ed87600f7819593eba4eee203eea959fc5f7e8890d3ac7e830f49177cf520",
|
||||
"dashboard_build": "9be39afd78636695609585dae74c464c1933643c17e5d0dbc73e169b021b599c",
|
||||
"desktop": true,
|
||||
"mobile_viewport": "390x526",
|
||||
"observations": [
|
||||
"Import search, keyboard result navigation and Escape passed",
|
||||
"Mobile import navigation closes drawer",
|
||||
"Private audit search returns no entry without dedicated authority",
|
||||
"One search clear button and one empty message confirmed",
|
||||
"Three visible pending requests opened the three-row filtered list",
|
||||
"Zero personal decisions opened the empty personal approval list"
|
||||
],
|
||||
"final_empty_list_text_native_review": false
|
||||
},
|
||||
"cleanup": {
|
||||
"preview_databases_removed": true,
|
||||
"preview_roles_removed": true,
|
||||
"owned_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false
|
||||
},
|
||||
"report_navigation_delta_20261128": {
|
||||
"status": "implemented_and_native_verified_in_isolated_qa",
|
||||
"scope": "In-page shortcuts only to report sections actually supplied by existing access projection; no new data, permissions or calculations",
|
||||
"frontend": {
|
||||
"tests": 11,
|
||||
"files": 6,
|
||||
"passed": true,
|
||||
"regression": "Sticky header destination spacing and focusable section targets covered; final two shortcut cases rerun passed"
|
||||
},
|
||||
"checks": {
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true
|
||||
},
|
||||
"build": {
|
||||
"directory": "storage/framework/testing/sgc-report-navigation-final-qa-20261128",
|
||||
"manifest_sha256": "6af5a1fe7f8a6e1fedcc6fcde931886ccbe9a53fbcb0e95b307a21250a6fc377",
|
||||
"entries": 183,
|
||||
"missing": 0
|
||||
},
|
||||
"native": {
|
||||
"desktop": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"observations": [
|
||||
"Only filters, operational follow-up, deliveries and contracts were supplied for this synthetic profile; no absent finance shortcut",
|
||||
"status=pending preserved across fragment navigation",
|
||||
"Initial desktop anchor heading was hidden behind sticky header; corrected and revisited in final build",
|
||||
"Final desktop and mobile anchor heading and first fields visible below header",
|
||||
"Three pending requisitions remained in the same report"
|
||||
]
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false
|
||||
},
|
||||
"company_navigation_delta_20261128": {
|
||||
"status": "implemented_and_verified_in_isolated_qa",
|
||||
"behaviour": [
|
||||
"Page title and conditional section shortcuts precede company geography and existing settings.",
|
||||
"Every shortcut targets one rendered focusable section, with desktop sticky-header offset.",
|
||||
"Current readiness gates approval timeout and urgent review policy links.",
|
||||
"Approval policy subpages retain Administration only when the actor already has the parent menu.",
|
||||
"No form, current permission, activation or business command is removed."
|
||||
],
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 57,
|
||||
"files": 10,
|
||||
"overlapping_prior_groups_not_summed": true
|
||||
},
|
||||
"organization_sqlite": {
|
||||
"tests": 25,
|
||||
"assertions": 267
|
||||
},
|
||||
"types": true,
|
||||
"scoped_format_lint": true,
|
||||
"phpstan_errors": 0,
|
||||
"menu_contract": {
|
||||
"entries": 149,
|
||||
"roles": 6
|
||||
},
|
||||
"build": true,
|
||||
"native": {
|
||||
"initial_navigation_manifest": "b8fe3b273f043ad293b379f8ca0f955eac029317e8ba65e912e3f210034684ec",
|
||||
"desktop_users_anchor_heading_visible": true,
|
||||
"mobile_width": 390,
|
||||
"mobile_height": 526,
|
||||
"mobile_comparison_anchor_heading_and_fields_visible": true,
|
||||
"general_30_and_urgent_5_minutes_readable": true,
|
||||
"final_urgent_policy_shortcut_followed": true,
|
||||
"final_approval_policy_header_administration": true
|
||||
}
|
||||
},
|
||||
"final_manifest_sha256": "d6c7d85e10e7130be45a526dd52b73d728a13f012f44c5c2b9bbca187761f386",
|
||||
"cleanup": {
|
||||
"all_own_databases_and_roles_removed": true,
|
||||
"own_browser_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Synthetic QA only. No real grants, installation, activation, policy save or integral application acceptance."
|
||||
},
|
||||
"print_deep_link_delta_20261129": {
|
||||
"status": "corrected_and_native_verified_in_isolated_qa",
|
||||
"cause": "After authentication, an intended non-Inertia print response opened in the Inertia response frame instead of the complete document.",
|
||||
"fix": "Authorise the current order first; an Inertia request receives a canonical internal location response, and a normal GET retains its HTML view. No login policy or permission was changed.",
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 3,
|
||||
"assertions": 75
|
||||
},
|
||||
"phpstan_errors": 0,
|
||||
"native_http_checks": 464,
|
||||
"native_post_requests": 53,
|
||||
"profiles": 7,
|
||||
"native_direct_print_after_login": {
|
||||
"complete_document_url": true,
|
||||
"invalid_inertia_srcdoc_frame": false,
|
||||
"budget_confirmation_visible": true,
|
||||
"total_minor": 10000,
|
||||
"project_and_chart_preserved": true,
|
||||
"pages": 2,
|
||||
"comparison_matrix_and_final_approvals_complete": true,
|
||||
"print_cancelled": true
|
||||
},
|
||||
"native_large_legacy_document": {
|
||||
"lines": 50,
|
||||
"pages": 3,
|
||||
"repeated_headers": true,
|
||||
"whole_rows_at_breaks": true,
|
||||
"subtotal_minor": 10000,
|
||||
"tax_minor": 0,
|
||||
"total_minor": 10000,
|
||||
"incomplete_original_branch": true,
|
||||
"fixture_only_not_native_issuance": true,
|
||||
"print_cancelled": true
|
||||
}
|
||||
},
|
||||
"manifest_sha256": "3405190f73702906bdde29cb0d35ce1d4252c3886eaf715a3c9edb28ab5a624c",
|
||||
"cleanup": {
|
||||
"large_preview_database_and_role_removed": true,
|
||||
"controlled_preview_root_and_server_absent": true,
|
||||
"controlled_preview_cleanup_basis": "The preview ended automatically. The owned root and server processes were absent; the runner removes database/role and stops the cluster before removing that root. Final stdout was not retained.",
|
||||
"own_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"physical_print_or_external_transmission": false,
|
||||
"operational_changes": false,
|
||||
"limits": "Synthetic QA only; no financial execution, installation, activation or integral application acceptance."
|
||||
},
|
||||
"legal_navigation_delta_20261129": {
|
||||
"scope": "Synthetic isolated QA; no publication, calculation activation, installation or new grants",
|
||||
"frontend_tests": 35,
|
||||
"frontend_files": 4,
|
||||
"types_scoped_check_build_passed": true,
|
||||
"menu_contract_entries": 149,
|
||||
"menu_contract_roles": 6,
|
||||
"private_manifest_sha256": "5027dc1014d9a4fbe95c6b9c949987c5a6ce7eb38432b5f71b3b2c066b3447dc",
|
||||
"native_desktop": {
|
||||
"six_conditional_section_links_observed": true,
|
||||
"prepare_revision_jumps_below_sticky_header": true,
|
||||
"copied_specific_mzn_per_g": "0.0099",
|
||||
"clear_then_close_without_residual_warning": true,
|
||||
"mobile_reviewed_this_delta": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
}
|
||||
},
|
||||
"documentary_native_navigation_delta_20261129": {
|
||||
"scope": "Isolated synthetic documentary import; existing native services and permissions only",
|
||||
"fixture": {
|
||||
"new_guarded_preview_flag": "--import-documentary-preview --native-review --integrated-schema --frozen-runtime",
|
||||
"synthetic_originals": 4,
|
||||
"bank_initial_version": 1
|
||||
},
|
||||
"native_before_menu_fix": {
|
||||
"dossier_four_original_versions_and_correction_controls": true,
|
||||
"bank_link_from_dossier": true,
|
||||
"bank_documents_gathered_not_delivered": true,
|
||||
"explicit_deadline_readable": true,
|
||||
"mobile": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"bank_title_state_deadline_no_lateral_clipping": true
|
||||
},
|
||||
"menu_defect_observed": "Documentary import pages displayed generic workspace without active menu"
|
||||
},
|
||||
"fix": {
|
||||
"existing_authorised_supply_imports_entry_only": true,
|
||||
"pages": [
|
||||
"documentos",
|
||||
"documentos/18",
|
||||
"suporte-bancario",
|
||||
"acompanhamento",
|
||||
"custos"
|
||||
],
|
||||
"new_grants": false
|
||||
},
|
||||
"verification": {
|
||||
"frontend_tests": 22,
|
||||
"frontend_files": 4,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"menu_entries": 149,
|
||||
"menu_roles": 6,
|
||||
"build": true,
|
||||
"manifest_sha256": "4857fa1b45c4b082e615d76e028af2be67d177efaf93fcee46dceee99ddcbd9a",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native_after_fix": {
|
||||
"desktop_purchasing_group_active": true,
|
||||
"imports_menu_entry_highlighted": true,
|
||||
"bank_copy_revision_saved_version": 2,
|
||||
"version1_history_retained": true,
|
||||
"requirements_invoice_count": 1,
|
||||
"deadline_retained": "2026-11-28",
|
||||
"delivery_still_not_documented": true,
|
||||
"hard_reload_preserved_version2": true,
|
||||
"after_save_reload_and_close_without_false_warning": true
|
||||
},
|
||||
"cleanup": {
|
||||
"both_owned_databases_and_roles_removed": true,
|
||||
"own_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"limits": "No OS upload/date-picker entry, JUE or bank execution, printing, activation or operational installation. Mobile was reviewed before the menu-only fix; no new mobile proof after it."
|
||||
},
|
||||
"budget_guidance_delta_20261129": {
|
||||
"scope": "Text only: home and technical equipment validation no longer claim budget is never checked. Refer to native process control; development warning preserved.",
|
||||
"frontend_tests": 4,
|
||||
"frontend_files": 2,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true,
|
||||
"manifest_sha256": "0bae70a618e67c76d590ccf2c2dd9484dc1bd7c332cde4d0dc74cf6b52a7be92",
|
||||
"manifest_entries": 184,
|
||||
"native_visual_this_delta": false,
|
||||
"financial_or_permission_logic_changed": false
|
||||
},
|
||||
"supply_contract_navigation_delta_20261129": {
|
||||
"scope": "Supply menu context and contract presentation only, existing access and workflows preserved",
|
||||
"menu": {
|
||||
"aliases": [
|
||||
"/compras/fornecimento with default/agreements/contracts view",
|
||||
"/compras/acordos/vigencia including contract query"
|
||||
],
|
||||
"destination": "supply_agreements",
|
||||
"requires_existing_authorised_entry": true,
|
||||
"search_terms": [
|
||||
"acordos",
|
||||
"contratos",
|
||||
"vigencia"
|
||||
],
|
||||
"no_new_route_or_grant": true
|
||||
},
|
||||
"presentation": {
|
||||
"contract_preparation_label": "Novo contrato com v?rios artigos",
|
||||
"card_title_uses_escaped_documentary_reference": true,
|
||||
"missing_reference_explicit": true,
|
||||
"navigation_semantic_group_wraps_with_spacing": true
|
||||
},
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 39,
|
||||
"files": 4,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"vigency_contract_option_highlight_visually_confirmed": true,
|
||||
"search_contracts_one_existing_authorised_destination": true,
|
||||
"return_to_contracts_link_opened": true,
|
||||
"final_contract_label_and_reference_and_link_spacing_confirmed": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"no_mobile_delta": true,
|
||||
"mobile_block": "Two attempts to open device tools did not produce an observable tool panel; this front stopped without claiming mobile coverage",
|
||||
"previews_removed": true,
|
||||
"user_original_tab_preserved": true
|
||||
},
|
||||
"manifests": {
|
||||
"menu_review": "70742eeb2d6416d605fda0db496b417728262740adda9d8a11d4aefac1b7d7e2",
|
||||
"final_contract_review": "872018a819feaff11a0d30a7592246e435171470de01499efd30010e65fc60f9"
|
||||
},
|
||||
"operational_changes": false,
|
||||
"full_product_complete": false
|
||||
},
|
||||
"supplier_evaluation_section_navigation_delta_20261129": {
|
||||
"scope": "Conditional supplier evaluation section shortcuts with existing authority and report boundaries",
|
||||
"implementation": {
|
||||
"closed_by_default": true,
|
||||
"hidden_in_print": true,
|
||||
"focusable_panel_targets": true,
|
||||
"existing_panel_sticky_header_offset": true,
|
||||
"sections": [
|
||||
"evidence",
|
||||
"last review when present",
|
||||
"independent review when permitted",
|
||||
"new revision when permitted",
|
||||
"history outside report-only",
|
||||
"improvements",
|
||||
"responses"
|
||||
],
|
||||
"no_business_logic_or_grants_changed": true
|
||||
},
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 23,
|
||||
"files": 4,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"approved_evaluation": 1,
|
||||
"closed_disclosure_observed": true,
|
||||
"five_present_links_confirmed": true,
|
||||
"improvements_link_lands_with_title_below_header": true,
|
||||
"responses_link_lands_with_title_below_header": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"no_new_mobile_or_print_review": true,
|
||||
"mobile_diagnosis": "Keyboard shortcuts previously did not open tools; visible browser More tools submenu confirmed command available but its native geometry lies outside main window. Separate screenshot coordinate click timed out and submenu keyboard fallback did not open tools. This front stopped; original user tab preserved.",
|
||||
"qa_tab_closed": true
|
||||
},
|
||||
"manifest_sha256": "c4d051ccb0f5de3f52f101d0f0256eb993f42e48e8f14ea7afb5fa4dbd60299c",
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"full_product_complete": false
|
||||
},
|
||||
"native_narrow_window_navigation_delta_20261129": {
|
||||
"scope": "Native independent narrow-window alternative after unavailable device tools, not 390px emulation",
|
||||
"manifest_sha256": "c4d051ccb0f5de3f52f101d0f0256eb993f42e48e8f14ea7afb5fa4dbd60299c",
|
||||
"native": {
|
||||
"browser": "Edge separate owned window",
|
||||
"outer_window_image_width_px": 502,
|
||||
"outer_window_image_height_px": 998,
|
||||
"css_viewport_width_not_measured": true,
|
||||
"original_window_bounds_unchanged": true,
|
||||
"closed_disclosure_observed": true,
|
||||
"all_five_section_links_single_column_readable": true,
|
||||
"response_anchor_title_below_header": true,
|
||||
"response_content_readable_without_observed_lateral_cut": true,
|
||||
"adapted_menu_opens_and_fits": true,
|
||||
"contract_search_returns_existing_supply_destination": true,
|
||||
"selecting_result_closes_menu_and_opens_agreements": true,
|
||||
"linked_contract_workspace_labels_reference_and_separated_links_readable": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"owned_window_closed_and_original_windows_inventory_preserved": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": [
|
||||
"This supersedes lack of narrow-window evidence only for the described views",
|
||||
"390px device emulation remains unverified in this delta",
|
||||
"Earlier historical 390px proofs retain their original scope"
|
||||
]
|
||||
},
|
||||
"native_direction_release_and_list_delta_20261129": {
|
||||
"scope": "Native direction release and truthful paged consultation of documentary statements versus current impediment, isolated synthetic QA only",
|
||||
"before_list_fix": {
|
||||
"manifest_sha256": "11185f53ff796a708943b710e31f3a91403a088e94e92994fac43be9ab9a3a93",
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"author_without_direction_saw_no_release_form": true,
|
||||
"direction_with_own_function_saw_release_form": true,
|
||||
"empty_reason_refused": true,
|
||||
"first_declaration_released": true,
|
||||
"original_visible": true,
|
||||
"second_declaration_still_showed_impediment": true,
|
||||
"list_stale_denial_of_release_observed": true,
|
||||
"own_tab_closed_original_preserved": true
|
||||
},
|
||||
"conservation": {
|
||||
"release_id": 1,
|
||||
"declaration_id": 1,
|
||||
"direction_id": 10,
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"selected_supplier_impediment_released": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"release_audit_count": 1,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
}
|
||||
},
|
||||
"change": {
|
||||
"old_notice_incorrectly_denied_release": true,
|
||||
"notice_now_matches_express_direction_rule": true,
|
||||
"access_description_no_longer_excludes_own_direction_authority": true,
|
||||
"statement_flag_preserved": true,
|
||||
"released_roots_queried_only_for_visible_current_page": true,
|
||||
"corrected_chain_uses_root_identity": true,
|
||||
"no_permission_schema_or_writer_change": true
|
||||
},
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 47,
|
||||
"assertions": 473,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql_frozen": {
|
||||
"tests": 47,
|
||||
"assertions": 473,
|
||||
"passed": true,
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 11,
|
||||
"files": 2,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true,
|
||||
"test_fixture_correction": "Initial two new assertions lacked configured membership after activating company profiles; corrected disposable fixture, kept forbidden response for identity without assignment, retained current production middleware and authority."
|
||||
},
|
||||
"native_final": {
|
||||
"browser": "Edge desktop",
|
||||
"direction_authorised_one_synthetic_declaration": true,
|
||||
"list_original_conflict_statement_preserved": true,
|
||||
"one_active_and_one_direction_released_state_visibly_distinct": true,
|
||||
"new_direction_notice_visible": true,
|
||||
"reload_preserves_distinct_states": true,
|
||||
"no_new_mobile_or_print_delta": true,
|
||||
"own_tab_closed_original_preserved": true
|
||||
},
|
||||
"conservation_final": {
|
||||
"release_id": 1,
|
||||
"declaration_id": 1,
|
||||
"direction_id": 10,
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"user_frame_scope": "id, tenant_id, department_id, purchasing_role; normal authentication token rotation excluded",
|
||||
"selected_supplier_impediment_released": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"release_audit_count": 1,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"private_manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"limits": [
|
||||
"No real grant, real direction decision, pilot migration, activation, SGF or financial operation",
|
||||
"Current list review is desktop only; earlier narrow-window navigation evidence remains separately scoped",
|
||||
"Does not certify full application completion or business acceptance"
|
||||
]
|
||||
},
|
||||
"native_direction_release_mobile_delta_20261129": {
|
||||
"scope": "Native responsive review at observed390x526 and100percent; separate owned QA window",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"native": {
|
||||
"device_width": 390,
|
||||
"device_height": 526,
|
||||
"scale_percent": 100,
|
||||
"tools_recovered_in_main_qa_window": true,
|
||||
"older_device_tool_observation_limitation_superseded_for_this_path": true,
|
||||
"declaration_header_and_source_readable": true,
|
||||
"release_form_and_express_synthetic_decision_usable": true,
|
||||
"original_and_direction_reason_readable_after_save": true,
|
||||
"list_shows_one_active_and_one_direction_released_statement": true,
|
||||
"horizontal_scroll_confined_to_table": true,
|
||||
"history_links_accessible_after_horizontal_scroll": true,
|
||||
"other_declaration_history_still_has_impediment": true,
|
||||
"owned_devtools_and_window_closed": true,
|
||||
"original_windows_preserved": true
|
||||
},
|
||||
"conservation": {
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"one_release_and_one_audit": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"observed_environment_issues": {
|
||||
"qa_favicon_http404": "Resolved in private helper: all three original public icons copied and actual HTTP200/exact SHA256 verified in the next isolated startup; see native_static_assets_delta_20261129.",
|
||||
"grammarly": "Observed chrome-extension resource errors from existing browser extension; no repository attribution or extension setting change"
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"limits": [
|
||||
"Responsive emulation, not physical phone testing",
|
||||
"Does not certify all modules or business acceptance"
|
||||
]
|
||||
},
|
||||
"native_static_assets_delta_20261129": {
|
||||
"status": "QA helper corrected and startup verified; mobile supplier/contracts review remains pending",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-140f0f99c7d9",
|
||||
"static_assets": {
|
||||
"favicon.ico": "4606a56e6ef3f5ec39201497f57069d5457ce9cea25227134d0ba378788e9070",
|
||||
"favicon.svg": "242f4f8f93f5fbc6c8aeec500c9bac02dcfe68daba166d484c5cdc986c88d8ee",
|
||||
"apple-touch-icon.png": "4001aa032ff113e1a268a9bbf1ab0fd9949439f9f54a85895956eb323aba977d"
|
||||
},
|
||||
"http_200_and_exact_hash_verified": true,
|
||||
"original_public_assets_changed": false,
|
||||
"mobile_review": {
|
||||
"owned_window": 15796900,
|
||||
"observed_viewport": "390x526 at 100 percent",
|
||||
"login_only": true,
|
||||
"supplier_and_contract_paths_verified": false,
|
||||
"limitation": "Native clicks and subsequent state read timed out; stopped this front after two consecutive attempts without progress. Owned window closure could not be verified; original windows were not targeted.",
|
||||
"later_recovery": "Owned old window closed and following responsive review completed; see native_mobile_navigation_completion_delta_20261129."
|
||||
},
|
||||
"cleanup": {
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true,
|
||||
"operational_changes": false
|
||||
}
|
||||
},
|
||||
"native_mobile_navigation_completion_delta_20261129": {
|
||||
"status": "Native responsive review passed",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-17db8e4d1176",
|
||||
"viewport": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"scale_percent": 100
|
||||
},
|
||||
"evaluation": {
|
||||
"closed_by_default": true,
|
||||
"five_links_single_column": true,
|
||||
"improvements_heading_below_sticky_header": true,
|
||||
"response_heading_below_sticky_header": true,
|
||||
"approved_version_3_preserved": true
|
||||
},
|
||||
"contracts": {
|
||||
"menu_search": "contratos",
|
||||
"single_existing_destination": "Fornecimento habitual",
|
||||
"adapted_drawer_closes_after_navigation": true,
|
||||
"agreements_to_contracts_link_followed": true,
|
||||
"header_links_separated_and_wrapped": true,
|
||||
"new_label": "Novo contrato com vários artigos",
|
||||
"document_title": "Contrato QA-VISUAL-CONTRACT",
|
||||
"readable_without_horizontal_page_overflow": true
|
||||
},
|
||||
"urgent_deadline": {
|
||||
"route": "/requisicoes/6/prazos",
|
||||
"configured_synthetic_minutes": 5,
|
||||
"stage_started_local": "29/11/2026 04:12:15",
|
||||
"expires_local": "29/11/2026 04:17:15",
|
||||
"reduced_urgency_explanation_visible": true,
|
||||
"no_deadline_command_executed": true,
|
||||
"no_stock_minimum_reduction_test_in_this_pass": true
|
||||
},
|
||||
"cleanup": {
|
||||
"old_orphan_owned_window_closed": true,
|
||||
"new_owned_tools_and_window_closed": true,
|
||||
"original_windows_preserved": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Responsive emulation, not physical phone acceptance; responsibility copy issue observed separately and corrected after this preview."
|
||||
},
|
||||
"native_urgent_stock_minimum_delta_20261129": {
|
||||
"status": "Native evidence recorded and verified in isolated synthetic QA",
|
||||
"manifest_sha256": "0aa249f43699b04a398974372366e3aebf45e209ee843a82ae55c0628236d4c1",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-9cc62a8955d4",
|
||||
"native": {
|
||||
"request_id": 7,
|
||||
"normal_count_before_evidence": 3,
|
||||
"configured_urgent_count": 1,
|
||||
"minimum_stock_units": 20,
|
||||
"free_stock_units": 0,
|
||||
"nature_usage_and_warehouse_visible": true,
|
||||
"empty_reason_refused_by_native_required_field": true,
|
||||
"evidence_id": 20,
|
||||
"saved_and_reloaded": true,
|
||||
"comparison_shows_reduction_3_to_1": true,
|
||||
"independent_evaluators_remain": 2,
|
||||
"desktop_and_mobile_readability": true,
|
||||
"mobile_viewport": "390x526 at 100 percent",
|
||||
"no_quotation_award_order_or_payment_created": true
|
||||
},
|
||||
"verification": {
|
||||
"eligible_evidence": 1,
|
||||
"single_audit": true,
|
||||
"protected_financial_stock_and_authority_frames": 13,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true
|
||||
},
|
||||
"fixture_correction": "Initial preview completed only the department-head decision, leaving the request pending; the form correctly stayed unavailable. Fixture now completes all eligible independent native stages and guards approved status plus actual quotation preparation authority before serving. Initial preview stopped without recording evidence; its post-check correctly failed, with a noisy JSON parse error now replaced by the original diagnostic. No product authority was weakened.",
|
||||
"cleanup": {
|
||||
"both_isolated_databases_and_roles_removed": true,
|
||||
"owned_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "No native above-minimum refusal in this pass; existing backend tests retain that coverage. No operational configuration, grants or activation."
|
||||
},
|
||||
"supply_context_guidance_delta_20261129": {
|
||||
"status": "Context guidance corrected and natively reviewed",
|
||||
"changes": "Descriptions and responsibilities now follow contracts, agreements, replenishment and imports; customs/logistics remain in imports. Generic contract shortcut removed from imports.",
|
||||
"frontend_tests": {
|
||||
"tests": 13,
|
||||
"files": 1
|
||||
},
|
||||
"types": "passed",
|
||||
"scoped_format_and_lint": "passed",
|
||||
"native": {
|
||||
"four_areas_at_390": true,
|
||||
"contracts_also_desktop": true,
|
||||
"guidance_manifest": "527e4b2ef33d5b580ab8d1b10582610c3fa683f7e7c71957cd81930d95cfec07",
|
||||
"final_import_shortcut_manifest": "0aa249f43699b04a398974372366e3aebf45e209ee843a82ae55c0628236d4c1",
|
||||
"final_import_has_no_unrelated_contract_shortcut": true,
|
||||
"no_saves": true
|
||||
},
|
||||
"cleanup": "Private databases/roles and owned windows/tabs removed; original windows preserved.",
|
||||
"operational_changes": false
|
||||
},
|
||||
"quotation_context_navigation_delta_20261129": {
|
||||
"status": "Implemented and natively reviewed",
|
||||
"manifest_sha256": "4b9768dc7b006e8fd6454f31c59b0d81e0e1a69454b1c4f5eb92b899a71e5ccf",
|
||||
"change": "Adjudication stays directly visible; seven related stages/documents grouped in a disclosure closed by default, two columns desktop and one mobile. Conditional urgent stock destination unchanged. Navigation hidden in print.",
|
||||
"tests": {
|
||||
"frontend": 14,
|
||||
"files": 3,
|
||||
"types": "passed",
|
||||
"scoped_lint_format": "passed",
|
||||
"build": "passed",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native": {
|
||||
"desktop_closed_and_open": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"seven_links_readable": true,
|
||||
"source_request_link_followed": true,
|
||||
"correct_request_number": "REQ-2026-000003",
|
||||
"source_still_approved_version_3": true,
|
||||
"no_saves": true
|
||||
},
|
||||
"cleanup": {
|
||||
"database_and_role_removed": true,
|
||||
"owned_tab_and_tools_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "No native urgency-link test in this preview; component test covers its original condition. Does not certify whole application acceptance."
|
||||
},
|
||||
"native_legacy_cancellation_delta_20261129": {
|
||||
"status": "Legacy presentation fixed; native cancellation cycle partially demonstrated, final decision not confirmed",
|
||||
"manifest_sha256": "99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be",
|
||||
"change": "Incomplete historical order branch now renders the same server-authorised operational/cancellation component as complete orders. Original unknown fields remain unknown; no authority or business command changed.",
|
||||
"tests": {
|
||||
"frontend": 18,
|
||||
"files": 2,
|
||||
"types": "passed",
|
||||
"scoped_lint_format": "passed",
|
||||
"build": "passed",
|
||||
"syntax_pint_node": "passed"
|
||||
},
|
||||
"native": {
|
||||
"initial_omission_observed": true,
|
||||
"corrected_legacy_operational_panel_visible": true,
|
||||
"request_submitted_by_independent_buyer": true,
|
||||
"reason_and_support_preserved": true,
|
||||
"author_has_no_decision_command": true,
|
||||
"source_shows_pending_execution_hold": true,
|
||||
"finance_independent_login": true,
|
||||
"empty_decision_reason_refused": true,
|
||||
"approved_option_selected": true,
|
||||
"reason_entered": true,
|
||||
"final_confirmation_not_observed": true,
|
||||
"final_approval_not_confirmed": true
|
||||
},
|
||||
"limitation": "Computer Use stopped the turn because it could not determine the current browser URL with enough confidence to enforce policy. No further CUA calls or confirmation were attempted.",
|
||||
"conservation": "Mandatory final worker did not pass because approved cancellation was not present. This is not proof of a completed decision. Source is explicitly an uncontrolled legacy synthetic fixture, not a controlled financial reversal test.",
|
||||
"cleanup": {
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true,
|
||||
"operational_changes": false,
|
||||
"owned_browser_tab_or_confirmation_closure_not_verified": true
|
||||
},
|
||||
"remaining": "Resume native finance decision in a fresh isolated preview; then verify final original/financial/stock conservation and mobile/print. Whole application not complete."
|
||||
},
|
||||
"native_cancellation_confirmation_retry_20261129": {
|
||||
"status": "Second native confirmation observation blocked; no final approval confirmed",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-d47853ee7606",
|
||||
"manifest_sha256": "99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be",
|
||||
"progress": "Old confirmation was visibly cancelled and the old synthetic preparation discarded; original tab preserved. New request submitted with synthetic reason/support, separate Finance login, approval option and reason prepared.",
|
||||
"alternative_observation": "Fresh screenshot established URL and identity before the action; combined accessibility-and-screenshot observation still caused the tool to stop at the native confirmation.",
|
||||
"result": "Did not accept confirmation or claim a recorded decision. Stopped this UI front after repeated URL-confidence block; did not use another interface to execute the blocked decision.",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_or_dialog_closure_not_verified": true
|
||||
},
|
||||
"final_worker": "Refused because native approved cancellation absent. Not a passing complete-cycle conservation proof.",
|
||||
"operational_changes": false
|
||||
},
|
||||
"frontend_complete_regression_20261129": {
|
||||
"tests": 466,
|
||||
"files": 92,
|
||||
"result": "passed",
|
||||
"duration_seconds": 55.18,
|
||||
"does_not_imply_application_acceptance": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,5 +49,71 @@
|
||||
"runtime_packages": "18 hashes verified",
|
||||
"additional_pilot_migration": false,
|
||||
"business_commands": false,
|
||||
"full_visual_review": false
|
||||
"full_visual_review": false,
|
||||
"native_office_receipt_delta_20261129": {
|
||||
"scope": "Synthetic native office receipt; no production/SGF writes, physical print or PDF export",
|
||||
"build": "76a28260b1d93def6870b48017a451e61a4f34eacb048b822ff4059c21fefc31",
|
||||
"native_http": {
|
||||
"private_native_office_http_verified": true,
|
||||
"checks": 436,
|
||||
"native_post_requests": 51,
|
||||
"fortify_sessions": 7,
|
||||
"request_id": 7,
|
||||
"order_id": 2,
|
||||
"invoice_id": 1,
|
||||
"payment_ids": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"request_total_minor": 10000,
|
||||
"order_total_minor": 10000,
|
||||
"invoice_total_minor": 10000,
|
||||
"confirmed_payments_minor": [
|
||||
4000,
|
||||
6000
|
||||
],
|
||||
"outstanding_minor": 0,
|
||||
"budget_consumed_minor": 10000,
|
||||
"budget_available_minor": 90000,
|
||||
"order_budget_checked": true,
|
||||
"stock_quantity_milli": 1000,
|
||||
"stock_movements": 1,
|
||||
"journals": 0,
|
||||
"explicit_finance_category_total_minor": "10000",
|
||||
"all_business_mutations_via_native_http": true,
|
||||
"assertions_use_readonly_transactions": true,
|
||||
"budget_balance_via_native_http": true,
|
||||
"selector_self_final_approval_refused": true,
|
||||
"synthetic_only": true,
|
||||
"project_trace": null,
|
||||
"real_bank_or_sgf_operations": false,
|
||||
"browser_visual_acceptance": false,
|
||||
"private_manifest_sha256": "76a28260b1d93def6870b48017a451e61a4f34eacb048b822ff4059c21fefc31"
|
||||
},
|
||||
"native_browser": {
|
||||
"entry": "/ordens/2/recepcoes",
|
||||
"detail": "/recepcoes/1",
|
||||
"print": "/recepcoes/1/imprimir",
|
||||
"detail_opened_via_address_after_two_inconclusive_link_clicks": true,
|
||||
"print_link_opened_own_tab": true,
|
||||
"pages": 1,
|
||||
"order": "OC-2026-000002",
|
||||
"receipt": "REC-2026-000001",
|
||||
"delivery_note": "HTTP-OFFICE-DELIVERY-QA",
|
||||
"received": "1.000",
|
||||
"accepted": "1.000",
|
||||
"rejected": "0.000",
|
||||
"quality": "Conforme",
|
||||
"document_references_empty_explicit": true,
|
||||
"cancelled": true,
|
||||
"physical_print": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"two_own_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "Single native line only; no multi-page receipt, correction, attachment or mobile visual coverage claimed."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -922,5 +922,478 @@
|
||||
},
|
||||
"pilot_manifest_unchanged": "1edb9ab0aa62fcf4e9c9075ce6e405de5435dc8ea4799d1949535a96c718df4e",
|
||||
"remaining": "Physical multi-form post/back/forward/context/mobile/print, remaining approved forms and concrete owner decisions still open. No operational account/grant/policy/schema/install/SGF change or whole application acceptance."
|
||||
},
|
||||
"query_preparation_guard_delta_20261128": {
|
||||
"status": "implemented_native_verified_in_isolated_qa",
|
||||
"initial_findings": [
|
||||
"Deferred query submission was treated as an unsaved business preparation",
|
||||
"Generic input observation could re-mark a managed form dirty after its explicit state cleared it"
|
||||
],
|
||||
"implementation": [
|
||||
"Explicit query-form semantics for process search requisition filters report filters and task filters",
|
||||
"Managed form state remains authoritative; generic fallback still protects forms without a publisher",
|
||||
"Saved search preparations reuse the existing common preparation hook; remembered keys and writer requests unchanged"
|
||||
],
|
||||
"frontend": {
|
||||
"tests": 34,
|
||||
"files": 5,
|
||||
"passed": true,
|
||||
"overlapping_prior_runs_not_summed": true
|
||||
},
|
||||
"checks": {
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true,
|
||||
"diff_check": true
|
||||
},
|
||||
"native": {
|
||||
"build": "2c08ae1dea9d6049befd1c220a11ba8a175ebd96f3ea0f08d5a7baaefce0203b",
|
||||
"initial_query": "RA-1",
|
||||
"initial_query_submitted_without_prompt": true,
|
||||
"other_unsaved_search_name_blocked_query_change": true,
|
||||
"cancel_preserved_name_and_criteria": true,
|
||||
"clearing_name_allowed_query": "RA",
|
||||
"cleared_query_completed_without_residual_prompt": true,
|
||||
"owned_tab_closed_without_beforeunload_prompt": true,
|
||||
"saved_search_post_performed": false
|
||||
},
|
||||
"business_preparations_remain_protected": true,
|
||||
"real_operational_changes": false,
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
}
|
||||
},
|
||||
"consultation_filter_delta_20261128": {
|
||||
"status": "implemented_and_verified_in_isolated_qa",
|
||||
"screens": [
|
||||
"audit/metadata",
|
||||
"workflow/notices",
|
||||
"people/reports",
|
||||
"reports/supplier-improvements",
|
||||
"stock/availability",
|
||||
"supply/agreement-followup",
|
||||
"company/geography-review",
|
||||
"suppliers/index"
|
||||
],
|
||||
"change": "Only consultation forms carry data-query-form; supplier create/review and business preparations retain existing protection.",
|
||||
"tests": {
|
||||
"frontend": 23,
|
||||
"files": 5,
|
||||
"types": "passed",
|
||||
"scoped_format_and_lint": "passed",
|
||||
"build": "passed",
|
||||
"whole_repository_format": "reported 494 files; existing HEAD audit document also differs from formatter; no broad reformat performed"
|
||||
},
|
||||
"native": {
|
||||
"stock_warehouse": "ARM-TEST",
|
||||
"query": "QA",
|
||||
"url_query": "search=QA&warehouse_id=1",
|
||||
"submitted_without_unsaved_prompt": true,
|
||||
"tab_closed_without_beforeunload": true
|
||||
},
|
||||
"manifest_sha256": "527dda8bfbd0fab17e9436c97b8bf32b7071aba30845709e0486f4e969e42b28",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false
|
||||
},
|
||||
"approval_policy_guard_delta_20261128": {
|
||||
"status": "implemented_and_native_regression_verified",
|
||||
"forms": [
|
||||
"organization/approval-timeouts",
|
||||
"organization/urgent-review-policy"
|
||||
],
|
||||
"change": "Reused common managed preparation hook so restored dirty forms are discoverable even before guard event subscription.",
|
||||
"native": {
|
||||
"both_forms_block_departure_after_edit": true,
|
||||
"continue_editing_preserves_reason": true,
|
||||
"clearing_reason_allows_tab_close": true,
|
||||
"hard_reload_shows_native_warning": true,
|
||||
"hard_reload_after_confirmation_clears_remembered_state": true,
|
||||
"installed_source_explanation": "@inertiajs/core/dist/index.js InitialVisit.clearRememberedStateOnReload deletes history.rememberedState; no persistence across confirmed hard reload is claimed.",
|
||||
"history_regression": {
|
||||
"initial_reason": "QA-HISTORICO-PRAZOS-20261128",
|
||||
"full_navigation_to_parameters_confirmed_only_in_qa": true,
|
||||
"browser_back_restored_reason": true,
|
||||
"departure_blocked_before_any_further_input": true,
|
||||
"continue_editing_preserved_restored_reason": true,
|
||||
"clearing_reason_closed_without_prompt": true
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 20,
|
||||
"files": 4,
|
||||
"included_in_final_57_test_group": true
|
||||
},
|
||||
"types_and_scoped_checks": "passed",
|
||||
"manifest_sha256": "d6c7d85e10e7130be45a526dd52b73d728a13f012f44c5c2b9bbca187761f386",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"owned_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"policy_posts_performed": false,
|
||||
"operational_changes": false
|
||||
},
|
||||
"import_preparation_guard_delta_20261129": {
|
||||
"scope": "Synthetic QA only; common preparation/departure protection, no business writers, financial rules, grants or installation changed",
|
||||
"pages": [
|
||||
"supply/import-tariffs",
|
||||
"supply/import-estimate",
|
||||
"supply/import-dossier",
|
||||
"supply/import-bank-support",
|
||||
"supply/import-costs"
|
||||
],
|
||||
"changes": [
|
||||
"Use existing usePreparationDirty for restored/cleaned preparations",
|
||||
"Mark tariff GET lookup as consultation; business forms retain departure protection"
|
||||
],
|
||||
"verification": {
|
||||
"frontend_tests": 28,
|
||||
"frontend_files": 8,
|
||||
"types": true,
|
||||
"scoped_format_and_lint": true,
|
||||
"build": true,
|
||||
"manifest_sha256": "76a28260b1d93def6870b48017a451e61a4f34eacb048b822ff4059c21fefc31",
|
||||
"manifest_entries": 184,
|
||||
"missing_files": 0
|
||||
},
|
||||
"native_desktop": {
|
||||
"lookup_query": "QA-TARIFF",
|
||||
"lookup_submitted_without_false_warning": true,
|
||||
"proposal_code": "1234.56",
|
||||
"internal_exit_warned": true,
|
||||
"continue_editing_preserved_code": true,
|
||||
"clear_then_close_without_warning": true,
|
||||
"mobile_this_delta": false,
|
||||
"other_four_pages_native_this_delta": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "No all-module acceptance; browser proof covers tariff page only. Other pages have frontend/type/build validation."
|
||||
},
|
||||
"supplier_evaluation_preparation_delta_20261129": {
|
||||
"scope": "Existing supplier evaluation evidence and decision preparations use actor/company/context/version-scoped Inertia remember keys and common managed departure guard",
|
||||
"frontend": {
|
||||
"tests": 21,
|
||||
"files": 4,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true
|
||||
},
|
||||
"manifest_sha256": "469de423e3bf7e922968c8e237e5c06b302865e634dc1bf79114b6fa6629afa4",
|
||||
"manifest_entries": 184,
|
||||
"native_desktop": {
|
||||
"draft_revision_route": "/fornecedores/avaliacoes/2",
|
||||
"draft_internal_exit_warned": true,
|
||||
"draft_continue_preserved_text": true,
|
||||
"draft_full_departure_then_back_restored_text": true,
|
||||
"draft_restored_exit_warned_before_new_input": true,
|
||||
"draft_restored_source_value_then_logout_without_warning": true,
|
||||
"decision_actor": "qa-finance@example.invalid",
|
||||
"pending_review_route": "/fornecedores/avaliacoes/3",
|
||||
"decision_internal_exit_warned": true,
|
||||
"decision_continue_preserved_reason": true,
|
||||
"decision_full_departure_then_back_restored_reason": true,
|
||||
"decision_restored_exit_warned_before_new_input": true,
|
||||
"decision_clear_then_close_without_warning": true,
|
||||
"no_browser_save_submit_approve_or_return_executed": true
|
||||
},
|
||||
"verification_note": "Initial address entry autocompleted the old detail URL, causing reload and a Back to cached login; authenticated session remained intact. Confirmed pasted exact list URL before retry; both actual departures and Back recoveries then verified.",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "Desktop history and guards only; no new mobile proof, save/decision workflow or operational activation in this delta. Explicit reload retains Inertia's documented clearing behavior."
|
||||
},
|
||||
"native_direction_release_and_list_delta_20261129": {
|
||||
"scope": "Native direction release and truthful paged consultation of documentary statements versus current impediment, isolated synthetic QA only",
|
||||
"before_list_fix": {
|
||||
"manifest_sha256": "11185f53ff796a708943b710e31f3a91403a088e94e92994fac43be9ab9a3a93",
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"author_without_direction_saw_no_release_form": true,
|
||||
"direction_with_own_function_saw_release_form": true,
|
||||
"empty_reason_refused": true,
|
||||
"first_declaration_released": true,
|
||||
"original_visible": true,
|
||||
"second_declaration_still_showed_impediment": true,
|
||||
"list_stale_denial_of_release_observed": true,
|
||||
"own_tab_closed_original_preserved": true
|
||||
},
|
||||
"conservation": {
|
||||
"release_id": 1,
|
||||
"declaration_id": 1,
|
||||
"direction_id": 10,
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"selected_supplier_impediment_released": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"release_audit_count": 1,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
}
|
||||
},
|
||||
"change": {
|
||||
"old_notice_incorrectly_denied_release": true,
|
||||
"notice_now_matches_express_direction_rule": true,
|
||||
"access_description_no_longer_excludes_own_direction_authority": true,
|
||||
"statement_flag_preserved": true,
|
||||
"released_roots_queried_only_for_visible_current_page": true,
|
||||
"corrected_chain_uses_root_identity": true,
|
||||
"no_permission_schema_or_writer_change": true
|
||||
},
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 47,
|
||||
"assertions": 473,
|
||||
"passed": true
|
||||
},
|
||||
"postgresql_frozen": {
|
||||
"tests": 47,
|
||||
"assertions": 473,
|
||||
"passed": true,
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 11,
|
||||
"files": 2,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true,
|
||||
"test_fixture_correction": "Initial two new assertions lacked configured membership after activating company profiles; corrected disposable fixture, kept forbidden response for identity without assignment, retained current production middleware and authority."
|
||||
},
|
||||
"native_final": {
|
||||
"browser": "Edge desktop",
|
||||
"direction_authorised_one_synthetic_declaration": true,
|
||||
"list_original_conflict_statement_preserved": true,
|
||||
"one_active_and_one_direction_released_state_visibly_distinct": true,
|
||||
"new_direction_notice_visible": true,
|
||||
"reload_preserves_distinct_states": true,
|
||||
"no_new_mobile_or_print_delta": true,
|
||||
"own_tab_closed_original_preserved": true
|
||||
},
|
||||
"conservation_final": {
|
||||
"release_id": 1,
|
||||
"declaration_id": 1,
|
||||
"direction_id": 10,
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"user_frame_scope": "id, tenant_id, department_id, purchasing_role; normal authentication token rotation excluded",
|
||||
"selected_supplier_impediment_released": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"release_audit_count": 1,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"private_manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"limits": [
|
||||
"No real grant, real direction decision, pilot migration, activation, SGF or financial operation",
|
||||
"Current list review is desktop only; earlier narrow-window navigation evidence remains separately scoped",
|
||||
"Does not certify full application completion or business acceptance"
|
||||
]
|
||||
},
|
||||
"native_direction_release_mobile_delta_20261129": {
|
||||
"scope": "Native responsive review at observed390x526 and100percent; separate owned QA window",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"native": {
|
||||
"device_width": 390,
|
||||
"device_height": 526,
|
||||
"scale_percent": 100,
|
||||
"tools_recovered_in_main_qa_window": true,
|
||||
"older_device_tool_observation_limitation_superseded_for_this_path": true,
|
||||
"declaration_header_and_source_readable": true,
|
||||
"release_form_and_express_synthetic_decision_usable": true,
|
||||
"original_and_direction_reason_readable_after_save": true,
|
||||
"list_shows_one_active_and_one_direction_released_statement": true,
|
||||
"horizontal_scroll_confined_to_table": true,
|
||||
"history_links_accessible_after_horizontal_scroll": true,
|
||||
"other_declaration_history_still_has_impediment": true,
|
||||
"owned_devtools_and_window_closed": true,
|
||||
"original_windows_preserved": true
|
||||
},
|
||||
"conservation": {
|
||||
"originals_preserved": true,
|
||||
"financial_stock_and_authority_frames_preserved": 13,
|
||||
"one_release_and_one_audit": true,
|
||||
"other_process_impediment_still_blocks": true,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"observed_environment_issues": {
|
||||
"qa_favicon_http404": "Resolved in private helper: all three original public icons copied and actual HTTP200/exact SHA256 verified in the next isolated startup; see native_static_assets_delta_20261129.",
|
||||
"grammarly": "Observed chrome-extension resource errors from existing browser extension; no repository attribution or extension setting change"
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true
|
||||
},
|
||||
"limits": [
|
||||
"Responsive emulation, not physical phone testing",
|
||||
"Does not certify all modules or business acceptance"
|
||||
]
|
||||
},
|
||||
"native_static_assets_delta_20261129": {
|
||||
"status": "QA helper corrected and startup verified; mobile supplier/contracts review remains pending",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-140f0f99c7d9",
|
||||
"static_assets": {
|
||||
"favicon.ico": "4606a56e6ef3f5ec39201497f57069d5457ce9cea25227134d0ba378788e9070",
|
||||
"favicon.svg": "242f4f8f93f5fbc6c8aeec500c9bac02dcfe68daba166d484c5cdc986c88d8ee",
|
||||
"apple-touch-icon.png": "4001aa032ff113e1a268a9bbf1ab0fd9949439f9f54a85895956eb323aba977d"
|
||||
},
|
||||
"http_200_and_exact_hash_verified": true,
|
||||
"original_public_assets_changed": false,
|
||||
"mobile_review": {
|
||||
"owned_window": 15796900,
|
||||
"observed_viewport": "390x526 at 100 percent",
|
||||
"login_only": true,
|
||||
"supplier_and_contract_paths_verified": false,
|
||||
"limitation": "Native clicks and subsequent state read timed out; stopped this front after two consecutive attempts without progress. Owned window closure could not be verified; original windows were not targeted.",
|
||||
"later_recovery": "Owned old window closed and following responsive review completed; see native_mobile_navigation_completion_delta_20261129."
|
||||
},
|
||||
"cleanup": {
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true,
|
||||
"operational_changes": false
|
||||
}
|
||||
},
|
||||
"native_mobile_navigation_completion_delta_20261129": {
|
||||
"status": "Native responsive review passed",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-17db8e4d1176",
|
||||
"viewport": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"scale_percent": 100
|
||||
},
|
||||
"evaluation": {
|
||||
"closed_by_default": true,
|
||||
"five_links_single_column": true,
|
||||
"improvements_heading_below_sticky_header": true,
|
||||
"response_heading_below_sticky_header": true,
|
||||
"approved_version_3_preserved": true
|
||||
},
|
||||
"contracts": {
|
||||
"menu_search": "contratos",
|
||||
"single_existing_destination": "Fornecimento habitual",
|
||||
"adapted_drawer_closes_after_navigation": true,
|
||||
"agreements_to_contracts_link_followed": true,
|
||||
"header_links_separated_and_wrapped": true,
|
||||
"new_label": "Novo contrato com vários artigos",
|
||||
"document_title": "Contrato QA-VISUAL-CONTRACT",
|
||||
"readable_without_horizontal_page_overflow": true
|
||||
},
|
||||
"urgent_deadline": {
|
||||
"route": "/requisicoes/6/prazos",
|
||||
"configured_synthetic_minutes": 5,
|
||||
"stage_started_local": "29/11/2026 04:12:15",
|
||||
"expires_local": "29/11/2026 04:17:15",
|
||||
"reduced_urgency_explanation_visible": true,
|
||||
"no_deadline_command_executed": true,
|
||||
"no_stock_minimum_reduction_test_in_this_pass": true
|
||||
},
|
||||
"cleanup": {
|
||||
"old_orphan_owned_window_closed": true,
|
||||
"new_owned_tools_and_window_closed": true,
|
||||
"original_windows_preserved": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Responsive emulation, not physical phone acceptance; responsibility copy issue observed separately and corrected after this preview."
|
||||
},
|
||||
"native_urgent_stock_minimum_delta_20261129": {
|
||||
"status": "Native evidence recorded and verified in isolated synthetic QA",
|
||||
"manifest_sha256": "0aa249f43699b04a398974372366e3aebf45e209ee843a82ae55c0628236d4c1",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-9cc62a8955d4",
|
||||
"native": {
|
||||
"request_id": 7,
|
||||
"normal_count_before_evidence": 3,
|
||||
"configured_urgent_count": 1,
|
||||
"minimum_stock_units": 20,
|
||||
"free_stock_units": 0,
|
||||
"nature_usage_and_warehouse_visible": true,
|
||||
"empty_reason_refused_by_native_required_field": true,
|
||||
"evidence_id": 20,
|
||||
"saved_and_reloaded": true,
|
||||
"comparison_shows_reduction_3_to_1": true,
|
||||
"independent_evaluators_remain": 2,
|
||||
"desktop_and_mobile_readability": true,
|
||||
"mobile_viewport": "390x526 at 100 percent",
|
||||
"no_quotation_award_order_or_payment_created": true
|
||||
},
|
||||
"verification": {
|
||||
"eligible_evidence": 1,
|
||||
"single_audit": true,
|
||||
"protected_financial_stock_and_authority_frames": 13,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true
|
||||
},
|
||||
"fixture_correction": "Initial preview completed only the department-head decision, leaving the request pending; the form correctly stayed unavailable. Fixture now completes all eligible independent native stages and guards approved status plus actual quotation preparation authority before serving. Initial preview stopped without recording evidence; its post-check correctly failed, with a noisy JSON parse error now replaced by the original diagnostic. No product authority was weakened.",
|
||||
"cleanup": {
|
||||
"both_isolated_databases_and_roles_removed": true,
|
||||
"owned_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "No native above-minimum refusal in this pass; existing backend tests retain that coverage. No operational configuration, grants or activation."
|
||||
},
|
||||
"quotation_context_navigation_delta_20261129": {
|
||||
"status": "Implemented and natively reviewed",
|
||||
"manifest_sha256": "4b9768dc7b006e8fd6454f31c59b0d81e0e1a69454b1c4f5eb92b899a71e5ccf",
|
||||
"change": "Adjudication stays directly visible; seven related stages/documents grouped in a disclosure closed by default, two columns desktop and one mobile. Conditional urgent stock destination unchanged. Navigation hidden in print.",
|
||||
"tests": {
|
||||
"frontend": 14,
|
||||
"files": 3,
|
||||
"types": "passed",
|
||||
"scoped_lint_format": "passed",
|
||||
"build": "passed",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native": {
|
||||
"desktop_closed_and_open": true,
|
||||
"mobile": "390x526 at 100 percent",
|
||||
"seven_links_readable": true,
|
||||
"source_request_link_followed": true,
|
||||
"correct_request_number": "REQ-2026-000003",
|
||||
"source_still_approved_version_3": true,
|
||||
"no_saves": true
|
||||
},
|
||||
"cleanup": {
|
||||
"database_and_role_removed": true,
|
||||
"owned_tab_and_tools_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "No native urgency-link test in this preview; component test covers its original condition. Does not certify whole application acceptance."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,5 +590,279 @@
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"limits": "Synthetic records only. No bank transfer, operational financial effect, SGF write, installation or full application acceptance. The read-only financial snapshot belongs to the HTTP seed; no separate post-visual SQL snapshot is claimed."
|
||||
},
|
||||
"operational_order_search_delta_20261128": {
|
||||
"status": "implemented_and_verified_in_isolated_qa",
|
||||
"behaviour": [
|
||||
"Native register scope and current identity are reused for production/maintenance search.",
|
||||
"Literal reference, location and description search, independent pagination and metadata-only results.",
|
||||
"Selected order opens directly beyond the first page with a return-to-register link.",
|
||||
"Search scope details are collapsed to prioritise the mobile query form."
|
||||
],
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 15,
|
||||
"assertions": 500
|
||||
},
|
||||
"postgresql": {
|
||||
"tests": 9,
|
||||
"assertions": 231,
|
||||
"database_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 31,
|
||||
"files": 4
|
||||
},
|
||||
"types_check_pint_phpstan": "passed",
|
||||
"native": {
|
||||
"desktop": true,
|
||||
"mobile_width": 390,
|
||||
"mobile_height": 526,
|
||||
"query": "QA-SEARCH-OP-20261128",
|
||||
"result_count": 1,
|
||||
"direct_source_order_id": 18,
|
||||
"state": "Registada",
|
||||
"back_preserved_query": true,
|
||||
"source_card_readable": true,
|
||||
"query_form_visible_without_scrolling_on_mobile": true,
|
||||
"return_to_all_link": "backend and frontend verified; native click not performed"
|
||||
}
|
||||
},
|
||||
"manifest_sha256": "f0e64c675e059f0e532c84d78b0217fafee2632f7c3a60f88a74d63b491203db",
|
||||
"manifest_entries": 183,
|
||||
"cleanup": {
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true,
|
||||
"own_browser_tab_closed": true,
|
||||
"original_user_tab_preserved": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": "Synthetic QA only; no production activation, real grants, financial effect, stock movement, SGF change or integral application acceptance."
|
||||
},
|
||||
"order_financial_context_delta_20261129": {
|
||||
"status": "implemented_and_verified_in_isolated_qa",
|
||||
"changes": [
|
||||
"Order shows only currently visible source process links, including multiple authorised origins.",
|
||||
"Order and receipt pages link exact invoice order filters only for native Admin/Finance readers.",
|
||||
"Invoice consultation and registration have separate focusable destinations; context links target existing documents.",
|
||||
"Order detail now explicitly encrypts Inertia history.",
|
||||
"New ordinary orders preserve budget_checked from the existing budget authority response at issuance; no financial arithmetic or existing snapshot is changed.",
|
||||
"Screen, print and physical-operation notices distinguish preserved documentary confirmation from global budget assertions."
|
||||
],
|
||||
"verification": {
|
||||
"sqlite_navigation": {
|
||||
"tests": 2,
|
||||
"assertions": 67
|
||||
},
|
||||
"sqlite_budget_document": {
|
||||
"passed": 2,
|
||||
"skipped": 1,
|
||||
"assertions": 87,
|
||||
"skip": "Unpublished distribution contract absent from installed SQLite package; verified in frozen PostgreSQL instead."
|
||||
},
|
||||
"frozen_postgresql": {
|
||||
"tests": 6,
|
||||
"assertions": 181,
|
||||
"database_removed": true,
|
||||
"includes_print_navigation": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 22,
|
||||
"files": 5
|
||||
},
|
||||
"types": true,
|
||||
"scoped_format_lint": true,
|
||||
"phpstan_errors": 0,
|
||||
"build": true,
|
||||
"native_http": {
|
||||
"checks": 461,
|
||||
"native_post_requests": 53,
|
||||
"fortify_sessions": 7,
|
||||
"request_id": 7,
|
||||
"order_id": 2,
|
||||
"invoice_id": 1,
|
||||
"payment_ids": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"request_total_minor": 10000,
|
||||
"order_total_minor": 10000,
|
||||
"invoice_total_minor": 10000,
|
||||
"confirmed_payments_minor": [
|
||||
4000,
|
||||
6000
|
||||
],
|
||||
"outstanding_minor": 0,
|
||||
"budget_consumed_minor": 10000,
|
||||
"budget_available_minor": 90000,
|
||||
"order_budget_checked": true,
|
||||
"stock_quantity_milli": 1000,
|
||||
"stock_movements": 1,
|
||||
"journals": 0,
|
||||
"explicit_finance_category_total_minor": 10000
|
||||
}
|
||||
},
|
||||
"corrected_diagnostics": [
|
||||
"New native-page verification exposed missing order history encryption; fixed server and added regression without weakening the verifier.",
|
||||
"Own initial test used a versionless X-Inertia request and received the expected 409 refresh; assertion now checks the normal rendered page encryption directive.",
|
||||
"Own focused QA composition duplicated an already installed optional column; the fixture now reuses the complete existing schema instead of installing it twice.",
|
||||
"Typed current web actor helper replaced a generic user union in receipt projection."
|
||||
],
|
||||
"manifest_sha256": "3405190f73702906bdde29cb0d35ce1d4252c3886eaf715a3c9edb28ab5a624c",
|
||||
"manifest_entries": 184,
|
||||
"visual_proof": "capital-register-qa.json/native_project_financial_trace_delta_20261129",
|
||||
"cleanup": {
|
||||
"all_own_databases_removed": true,
|
||||
"all_own_roles_removed": true,
|
||||
"all_own_browser_tabs_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Development and synthetic QA only. Existing originals, budget/stock/payment authority and pilot manifest are preserved. Integral application acceptance remains open.",
|
||||
"print_regression": {
|
||||
"checks": 464,
|
||||
"native_post_requests": 53,
|
||||
"profiles": 7,
|
||||
"order_budget_checked": true,
|
||||
"financial_and_stock_totals_unchanged": true,
|
||||
"proof": "product-review-20261122.json/print_deep_link_delta_20261129"
|
||||
}
|
||||
},
|
||||
"receipt_detail_financial_link_delta_20261129": {
|
||||
"native_http": {
|
||||
"private_native_office_http_verified": true,
|
||||
"checks": 452,
|
||||
"native_post_requests": 51,
|
||||
"fortify_sessions": 7,
|
||||
"request_id": 7,
|
||||
"order_id": 2,
|
||||
"invoice_id": 1,
|
||||
"payment_ids": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"request_total_minor": 10000,
|
||||
"order_total_minor": 10000,
|
||||
"invoice_total_minor": 10000,
|
||||
"confirmed_payments_minor": [
|
||||
4000,
|
||||
6000
|
||||
],
|
||||
"outstanding_minor": 0,
|
||||
"budget_consumed_minor": 10000,
|
||||
"budget_available_minor": 90000,
|
||||
"order_budget_checked": true,
|
||||
"stock_quantity_milli": 1000,
|
||||
"stock_movements": 1,
|
||||
"journals": 0,
|
||||
"explicit_finance_category_total_minor": "10000",
|
||||
"all_business_mutations_via_native_http": true,
|
||||
"assertions_use_readonly_transactions": true,
|
||||
"budget_balance_via_native_http": true,
|
||||
"selector_self_final_approval_refused": true,
|
||||
"synthetic_only": true,
|
||||
"project_trace": null,
|
||||
"real_bank_or_sgf_operations": false,
|
||||
"browser_visual_acceptance": false,
|
||||
"private_manifest_sha256": "477f01e912bb6bb1a359c57d00ca5dab91a01f685ecddbad52fa932954de6b71"
|
||||
},
|
||||
"sqlite": {
|
||||
"tests": 3,
|
||||
"assertions": 95
|
||||
},
|
||||
"postgres": {
|
||||
"tests": 6,
|
||||
"assertions": 201,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 11,
|
||||
"files": 3,
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"scoped_format_lint": true,
|
||||
"build": true
|
||||
},
|
||||
"scope": "Receipt detail uses existing Admin/Finance authority to link exact order invoices. Warehouse receives null; foreign tenant404. Read-only financial/stock fingerprints preserved.",
|
||||
"native_visual_new_link": true,
|
||||
"native_visual_scope": "Desktop receipt1 to exact order2 registered invoice; no mobile this delta",
|
||||
"final_integrated_project_journey": {
|
||||
"private_native_office_http_verified": true,
|
||||
"checks": 480,
|
||||
"native_post_requests": 53,
|
||||
"fortify_sessions": 7,
|
||||
"request_id": 7,
|
||||
"order_id": 2,
|
||||
"invoice_id": 1,
|
||||
"payment_ids": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"request_total_minor": 10000,
|
||||
"order_total_minor": 10000,
|
||||
"invoice_total_minor": 10000,
|
||||
"confirmed_payments_minor": [
|
||||
4000,
|
||||
6000
|
||||
],
|
||||
"outstanding_minor": 0,
|
||||
"budget_consumed_minor": 10000,
|
||||
"budget_available_minor": 90000,
|
||||
"order_budget_checked": true,
|
||||
"stock_quantity_milli": 1000,
|
||||
"stock_movements": 1,
|
||||
"journals": 0,
|
||||
"explicit_finance_category_total_minor": "10000",
|
||||
"all_business_mutations_via_native_http": true,
|
||||
"assertions_use_readonly_transactions": true,
|
||||
"budget_balance_via_native_http": true,
|
||||
"selector_self_final_approval_refused": true,
|
||||
"synthetic_only": true,
|
||||
"project_trace": {
|
||||
"record_key": "bfdc5d9a-768d-4d1b-b13e-bddba26852c5",
|
||||
"code": "HTTP-PROJECT-QA",
|
||||
"version": 1,
|
||||
"order_id": 2
|
||||
},
|
||||
"real_bank_or_sgf_operations": false,
|
||||
"browser_visual_acceptance": false,
|
||||
"private_manifest_sha256": "e9472d5fdb99844147e427c0fd094f4b7910c11aad2966d0011442b979218846"
|
||||
}
|
||||
},
|
||||
"native_urgent_stock_minimum_delta_20261129": {
|
||||
"status": "Native evidence recorded and verified in isolated synthetic QA",
|
||||
"manifest_sha256": "0aa249f43699b04a398974372366e3aebf45e209ee843a82ae55c0628236d4c1",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-9cc62a8955d4",
|
||||
"native": {
|
||||
"request_id": 7,
|
||||
"normal_count_before_evidence": 3,
|
||||
"configured_urgent_count": 1,
|
||||
"minimum_stock_units": 20,
|
||||
"free_stock_units": 0,
|
||||
"nature_usage_and_warehouse_visible": true,
|
||||
"empty_reason_refused_by_native_required_field": true,
|
||||
"evidence_id": 20,
|
||||
"saved_and_reloaded": true,
|
||||
"comparison_shows_reduction_3_to_1": true,
|
||||
"independent_evaluators_remain": 2,
|
||||
"desktop_and_mobile_readability": true,
|
||||
"mobile_viewport": "390x526 at 100 percent",
|
||||
"no_quotation_award_order_or_payment_created": true
|
||||
},
|
||||
"verification": {
|
||||
"eligible_evidence": 1,
|
||||
"single_audit": true,
|
||||
"protected_financial_stock_and_authority_frames": 13,
|
||||
"readonly_transaction": true,
|
||||
"synthetic_only": true
|
||||
},
|
||||
"fixture_correction": "Initial preview completed only the department-head decision, leaving the request pending; the form correctly stayed unavailable. Fixture now completes all eligible independent native stages and guards approved status plus actual quotation preparation authority before serving. Initial preview stopped without recording evidence; its post-check correctly failed, with a noisy JSON parse error now replaced by the original diagnostic. No product authority was weakened.",
|
||||
"cleanup": {
|
||||
"both_isolated_databases_and_roles_removed": true,
|
||||
"owned_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "No native above-minimum refusal in this pass; existing backend tests retain that coverage. No operational configuration, grants or activation."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,47 +28,89 @@
|
||||
{
|
||||
"section": "10.1-10.2",
|
||||
"requirement": "Tariff code per imported item in material master/requisition, proposed classification, buyer confirmation or justified deviation",
|
||||
"state": "Documentary material master, per-item proposal, buyer confirmation/deviation and frozen projection to new orders/screen/print/cost workspace verified in isolated QA. New classified imports require a native logistics process and independent customs release before usable receipts. Official legal suggestions and remaining import requirements remain pending; see import-tariffs-qa.json."
|
||||
"state": "Documentary per-item tariff master/proposal, buyer confirmation/deviation and frozen issued sources implemented in QA. Editable official-source proposals and exact legal estimates now exist for the verified exemplars; not a complete consolidated tariff or activated tax rule.",
|
||||
"state_recorded_20261122": "Documentary material master, per-item proposal, buyer confirmation/deviation and frozen projection to new orders/screen/print/cost workspace verified in isolated QA. New classified imports require a native logistics process and independent customs release before usable receipts. Official legal suggestions and remaining import requirements remain pending; see import-tariffs-qa.json.",
|
||||
"evidence": [
|
||||
"import-tariffs-qa.json",
|
||||
"import-legal-readiness-qa.json",
|
||||
"import-legal-amounts-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.1,10.4",
|
||||
"requirement": "Versioned landed-cost estimate with goods, freight, insurance, duties, taxes and customs expenses; native budget/approval basis and explicit actual-cost changes",
|
||||
"state": "Native actual-document landed-cost preparation and common per-source reserve/commit/consume/amend/cancel verified in isolated QA; native principals and consumed floors preserved. Pre-document estimates, operational readiness and visual acceptance remain pending. See import-landed-cost-qa.json."
|
||||
"state": "Versioned pre-document assumptions, native full approval basis, additional-only reservation and explicit Finance partial reconciliation implemented in isolated QA. Actual landed-cost sources remain independently reviewed through the single budget writer. Operational adoption and remaining visual coverage are open.",
|
||||
"state_recorded_20261122": "Native actual-document landed-cost preparation and common per-source reserve/commit/consume/amend/cancel verified in isolated QA; native principals and consumed floors preserved. Pre-document estimates, operational readiness and visual acceptance remain pending. See import-landed-cost-qa.json.",
|
||||
"evidence": [
|
||||
"import-estimates-qa.json",
|
||||
"import-landed-cost-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.2-10.3",
|
||||
"requirement": "Selected broker/forwarder, written instructions and reusable shipment/customs document dossier linked to purchase and receipt",
|
||||
"state": "existing evidence text does not demonstrate typed document coverage"
|
||||
"state": "Versioned broker/forwarder selection and written instructions implemented in QA alongside typed private dossier and corrective versions. Uses existing supplier eligibility, conflict and independent buyer checks. No external JUE/bank execution; remaining native visual and operational adoption are open.",
|
||||
"state_recorded_20261122": "existing evidence text does not demonstrate typed document coverage",
|
||||
"evidence": [
|
||||
"import-parties-qa.json",
|
||||
"import-dossier-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "9,10.4",
|
||||
"requirement": "Related-party/conflict controls for supplier, broker and forwarder; preserve segregation, justified replacement and history",
|
||||
"state": "native supplier/process controls exist; broker/forwarder coverage not demonstrated"
|
||||
"state": "Versioned broker/forwarder selection, written instructions and existing supplier conflict/eligibility checks implemented in QA. Independent buyer authority and original evidence retained; remaining native visual coverage and operational adoption are open.",
|
||||
"state_recorded_20261122": "native supplier/process controls exist; broker/forwarder coverage not demonstrated",
|
||||
"evidence": [
|
||||
"import-parties-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.2-10.4",
|
||||
"requirement": "Record JUE declaration, unique document, customs assessment, documentary payment/release evidence and receipt lineage without duplicate stock movement",
|
||||
"state": "logistical states exist; external JUE integration and full documentary workflow not implemented by this record"
|
||||
"state": "Typed JUE/unique-document/customs-assessment/payment-release evidence can be preserved in the private documentary workflow. Native customs release still gates usable receipt through one stock writer. No external JUE submission or integration is asserted.",
|
||||
"state_recorded_20261122": "logistical states exist; external JUE integration and full documentary workflow not implemented by this record",
|
||||
"evidence": [
|
||||
"import-dossier-qa.json",
|
||||
"import-legal-readiness-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.4,10.7",
|
||||
"requirement": "Foreign-bank documentary commitment and support-document tracking; no inferred bank execution or card policy activation",
|
||||
"state": "new import-specific documentary requirements; rules and financial integration require concrete reconciliation"
|
||||
"state": "Documentary bank commitment, DU/declaration, explicit counts/deadline source, dated delivery, version history and CSV implemented in isolated QA. No bank execution, card-policy activation or operational installation.",
|
||||
"state_recorded_20261122": "new import-specific documentary requirements; rules and financial integration require concrete reconciliation",
|
||||
"evidence": [
|
||||
"import-bank-support-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.6-10.7",
|
||||
"requirement": "Versioned official tariff/legal/sector/origin/ICE rules, periods, sources, confirmed buyer suggestions and justified deviations",
|
||||
"state": "functional scope recorded; no customs rates, exemptions or legal validity certified from the Word summary"
|
||||
"state": "Source/version/period rules, explicit suggestions and buyer confirmation/deviation implemented in QA. Curated Law8 duty and Law7 ICE proposals use exact official bytes. Coverage of all legislation, rates, origins and sectors is incomplete; import/publication never activates a fiscal rule.",
|
||||
"state_recorded_20261122": "functional scope recorded; no customs rates, exemptions or legal validity certified from the Word summary",
|
||||
"evidence": [
|
||||
"import-legal-readiness-qa.json",
|
||||
"import-legal-amounts-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.8",
|
||||
"requirement": "Contextual missing-code/licence/document, cost/budget, payment-support, arrival/deadline, legal-change and pending-approval alerts",
|
||||
"state": "reconcile with native task/help channels; organization deadlines and recipients must remain explicitly configured"
|
||||
"state": "Contextual legal/logistics/document/party/bank/Finance follow-up implemented in QA through existing sources. Missing or changed evidence remains explicit; no invented deadlines, recipients or automatic notifications. Full native visual coverage remains open.",
|
||||
"state_recorded_20261122": "reconcile with native task/help channels; organization deadlines and recipients must remain explicitly configured",
|
||||
"evidence": [
|
||||
"import-legal-readiness-qa.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "10.4",
|
||||
"requirement": "Preserve customs originals, versions and audit evidence",
|
||||
"state": "Private originals, immutable corrective versions, hash-checked download and bounded inspection implemented in isolated QA. Combined SQL/private-file recovery demonstrated source loss and restoration of two versions into a separate private root with native authorized evidence access. No automatic deletion; operational service installation and visual acceptance remain pending."
|
||||
"state": "Typed private dossier, immutable corrective versions and download integrity implemented in QA, with combined SQL/private-file recovery. This does not execute external JUE or bank operations.",
|
||||
"state_recorded_20261122": "Private originals, immutable corrective versions, hash-checked download and bounded inspection implemented in isolated QA. Combined SQL/private-file recovery demonstrated source loss and restoration of two versions into a separate private root with native authorized evidence access. No automatic deletion; operational service installation and visual acceptance remain pending.",
|
||||
"evidence": [
|
||||
"import-dossier-qa.json"
|
||||
]
|
||||
}
|
||||
],
|
||||
"preserved": [
|
||||
@@ -78,5 +120,12 @@
|
||||
"Installed pilot release, real data and permissions",
|
||||
"No JUE submission, bank payment, legal-rate activation or operational installation"
|
||||
],
|
||||
"tracking": "Existing reconciled matrix and delivery/continuity documents only; no parallel backlog"
|
||||
"tracking": "Existing reconciled matrix and delivery/continuity documents only; no parallel backlog",
|
||||
"reconciliation_delta_20261129": {
|
||||
"basis": "Existing subsequent QA proofs inspected, not a new execution or new product acceptance",
|
||||
"historical_state_preserved": true,
|
||||
"missing_runtime_notes": "Historical limitations do not describe the currently available native Edge session. Native review exists only for expressly documented paths; the remaining visual coverage is still open.",
|
||||
"operational_limits": "No pilot installation, data migration, activation, new grants, external JUE or bank execution",
|
||||
"remaining": "Complete documentary/legal coverage and remaining native/mobile/print journeys; then concrete operational proposal and business acceptance"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,401 @@
|
||||
"history_events": 6,
|
||||
"synthetic_example_only": true,
|
||||
"financial_commands": 0,
|
||||
"visual_review": false
|
||||
"visual_review": false,
|
||||
"native_report_delta_20261129": {
|
||||
"scope": "Native-service synthetic evaluation created/submitted/independently approved; no actual supplier outcome, eligibility change or financial effect",
|
||||
"fixture": {
|
||||
"guarded_flag": "--supplier-review-preview --native-review --integrated-schema --frozen-runtime",
|
||||
"version": 3,
|
||||
"state": "approved",
|
||||
"author": "QA reviewer",
|
||||
"reviewer": "QA finance",
|
||||
"initial_own_period_issue": "Initial illustrative January period did not cover the generated order; corrected to its actual synthetic issued date and guarded at fixture runtime.",
|
||||
"period_contains_issued_order": true
|
||||
},
|
||||
"changes": [
|
||||
"Show preserved reviewer beside decision; format existing timestamp for local reading",
|
||||
"Reviewer name stays available independently of selected audit-history page",
|
||||
"Keep reviewer, reason and date together across printed pages"
|
||||
],
|
||||
"verification": {
|
||||
"sqlite_before_savepoint_test_adjustment": {
|
||||
"tests": 18,
|
||||
"assertions": 266
|
||||
},
|
||||
"sqlite_final_immutable_test": {
|
||||
"tests": 1,
|
||||
"assertions": 28
|
||||
},
|
||||
"postgresql_final": {
|
||||
"tests": 18,
|
||||
"assertions": 268
|
||||
},
|
||||
"postgresql_initial_failure": "17 passed; direct expected constraint failures left outer PostgreSQL test transaction aborted. Test now uses savepoints and checks original approval is intact; final full group passed.",
|
||||
"frontend": {
|
||||
"tests": 17,
|
||||
"files": 3,
|
||||
"final_decision_group_regression_tests": 2,
|
||||
"final_decision_group_regression_files": 1,
|
||||
"counts_overlap_do_not_sum": true
|
||||
},
|
||||
"types": true,
|
||||
"phpstan_errors": 0,
|
||||
"pint": true,
|
||||
"scoped_check": true,
|
||||
"build": true,
|
||||
"manifest_sha256": "b695d6e2652bd3eac178e02264fe2314052df67ec5ce1078f474a92a9e0aa716",
|
||||
"manifest_entries": 184
|
||||
},
|
||||
"native": {
|
||||
"desktop_period_criteria_author_and_reviewer_verified": true,
|
||||
"mobile_width": 390,
|
||||
"mobile_height": 526,
|
||||
"mobile_reviewer_reason_and_date_readable": true,
|
||||
"print_before_fix": "Decision date split onto next page",
|
||||
"print_final_pages": 2,
|
||||
"print_final_decision_whole_on_second_page": true,
|
||||
"print_cancelled": true,
|
||||
"physical_print": false
|
||||
},
|
||||
"cleanup": {
|
||||
"all_owned_databases_and_roles_removed": true,
|
||||
"own_tabs_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "Qualitative evaluation report only; no native nonempty improvement/contradictory review yet; no operational installation, new grants or full application acceptance."
|
||||
},
|
||||
"native_nonempty_followup_delta_20261129": {
|
||||
"scope": "Nonempty synthetic follow-up through existing native services; no actual supplier decision or external communication",
|
||||
"fixture": {
|
||||
"evaluation_id": 1,
|
||||
"version": 3,
|
||||
"route": "/fornecedores/avaliacoes/1",
|
||||
"report_route": "/fornecedores/avaliacoes/1/relatorio",
|
||||
"synthetic_only": true,
|
||||
"native_service_transitions": true,
|
||||
"period_contains_issued_order": true,
|
||||
"order_issued_on": "2026-11-28",
|
||||
"measure_id": 1,
|
||||
"measure_state": "closed",
|
||||
"response_id": 1,
|
||||
"response_state": "decided",
|
||||
"approved_evaluation_preserved": true
|
||||
},
|
||||
"manifest_sha256": "b695d6e2652bd3eac178e02264fe2314052df67ec5ce1078f474a92a9e0aa716",
|
||||
"native": {
|
||||
"desktop_measure_state": "Encerrada",
|
||||
"measure_version": 3,
|
||||
"responsible": "QA head",
|
||||
"measure_independent_reviewer": "QA finance",
|
||||
"measure_result_and_evidence_visible": true,
|
||||
"response_state": "Conclusão registada",
|
||||
"response_version": 3,
|
||||
"response_outcome": "Argumentos acolhidos",
|
||||
"response_source_arguments_reviewer_followup_and_reference_visible": true,
|
||||
"mobile": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"nonempty_measure_and_response_readable": true
|
||||
},
|
||||
"print_pages": 3,
|
||||
"print_measure_whole": true,
|
||||
"print_response_whole": true,
|
||||
"print_response_section_intro_on_previous_page": true,
|
||||
"print_cancelled": true,
|
||||
"physical_print": false
|
||||
},
|
||||
"preservation": {
|
||||
"native_fixture_compared_approved_evaluation_before_after": true,
|
||||
"approval_original_unchanged": true,
|
||||
"financial_or_stock_writer_added": false,
|
||||
"external_message_sent": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "This covers consultation and report of existing native closed/decided synthetic records; full browser editing/return/correction and external communication evidence remain separate. No pilot/SGF activation or business acceptance."
|
||||
},
|
||||
"supplier_evaluation_preparation_delta_20261129": {
|
||||
"scope": "Existing supplier evaluation evidence and decision preparations use actor/company/context/version-scoped Inertia remember keys and common managed departure guard",
|
||||
"frontend": {
|
||||
"tests": 21,
|
||||
"files": 4,
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"build": true
|
||||
},
|
||||
"manifest_sha256": "469de423e3bf7e922968c8e237e5c06b302865e634dc1bf79114b6fa6629afa4",
|
||||
"manifest_entries": 184,
|
||||
"native_desktop": {
|
||||
"draft_revision_route": "/fornecedores/avaliacoes/2",
|
||||
"draft_internal_exit_warned": true,
|
||||
"draft_continue_preserved_text": true,
|
||||
"draft_full_departure_then_back_restored_text": true,
|
||||
"draft_restored_exit_warned_before_new_input": true,
|
||||
"draft_restored_source_value_then_logout_without_warning": true,
|
||||
"decision_actor": "qa-finance@example.invalid",
|
||||
"pending_review_route": "/fornecedores/avaliacoes/3",
|
||||
"decision_internal_exit_warned": true,
|
||||
"decision_continue_preserved_reason": true,
|
||||
"decision_full_departure_then_back_restored_reason": true,
|
||||
"decision_restored_exit_warned_before_new_input": true,
|
||||
"decision_clear_then_close_without_warning": true,
|
||||
"no_browser_save_submit_approve_or_return_executed": true
|
||||
},
|
||||
"verification_note": "Initial address entry autocompleted the old detail URL, causing reload and a Back to cached login; authenticated session remained intact. Confirmed pasted exact list URL before retry; both actual departures and Back recoveries then verified.",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "Desktop history and guards only; no new mobile proof, save/decision workflow or operational activation in this delta. Explicit reload retains Inertia's documented clearing behavior."
|
||||
},
|
||||
"native_response_return_cycle_delta_20261129": {
|
||||
"scope": "Native synthetic response creation, required-date refusal, independent return, author correction and resubmission; no external message or real supplier decision",
|
||||
"manifest_sha256": "084b3d39114f9e7a4b5307c2242bbf98a1add5ae17251c1a6f515866cfb1ecfe",
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"evaluation_id": 1,
|
||||
"evaluation_approved_version_before_and_after": 3,
|
||||
"response_id": 2,
|
||||
"created_version": 1,
|
||||
"missing_date_submit_refused": true,
|
||||
"arguments_preserved_after_refusal": true,
|
||||
"native_date_segments_completed_and_confirmed": "2026-11-28",
|
||||
"saved_complete_version": 2,
|
||||
"first_submitted_version": 3,
|
||||
"independent_finance_returned_version": 4,
|
||||
"return_reason_visible_to_author": true,
|
||||
"author_corrected_source_reference_version": 5,
|
||||
"resubmitted_version": 6,
|
||||
"final_state": "review",
|
||||
"history_total_including_other_response": 9,
|
||||
"no_final_decision_in_this_delta": true,
|
||||
"closed_without_residual_warning": true,
|
||||
"no_mobile_or_print_delta": true
|
||||
},
|
||||
"frontend_cross_block": {
|
||||
"files": 92,
|
||||
"tests": 448,
|
||||
"passed": true,
|
||||
"overlaps_targeted_results_do_not_sum": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"original_browser_tab_preserved": true,
|
||||
"operational_changes": false
|
||||
}
|
||||
},
|
||||
"native_response_conclusion_delta_20261129": {
|
||||
"scope": "Native independent synthetic response conclusion; does not extend real reviewer authority or communicate externally",
|
||||
"fixture": {
|
||||
"pending_response_id": 2,
|
||||
"status": "review",
|
||||
"version": 2,
|
||||
"created_and_submitted_by_native_services": true,
|
||||
"approved_evaluation_attributes_preserved_by_fixture": true,
|
||||
"period_matches_fixture_order": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"reviewer": "QA finance",
|
||||
"missing_followup_refused_with_visible_error": true,
|
||||
"chosen_outcome_and_reason_preserved": true,
|
||||
"completed_followup_and_fake_response_reference": true,
|
||||
"final_status": "decided",
|
||||
"final_version": 3,
|
||||
"history_total_including_previous_response": 6,
|
||||
"reload_persists_outcome_reason_followup_reference_and_reviewer": true,
|
||||
"evaluation_screen_remains_approved_version": 3,
|
||||
"closed_without_residual_warning": true,
|
||||
"no_mobile_or_print_delta": true
|
||||
},
|
||||
"verification": {
|
||||
"fixture_php_syntax": true,
|
||||
"fixture_pint": true,
|
||||
"private_runtime_frozen_and_verified": true,
|
||||
"new_product_changes": false,
|
||||
"no_rebuild_required": true
|
||||
},
|
||||
"manifest_sha256": "872018a819feaff11a0d30a7592246e435171470de01499efd30010e65fc60f9",
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"user_original_tab_preserved": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": [
|
||||
"Separate disposable preview from the preceding native return/correction cycle; do not claim both occurred on the same persisted record",
|
||||
"No real supplier decision, message, final business acceptance or deployment"
|
||||
]
|
||||
},
|
||||
"native_measure_complete_cycle_delta_20261129": {
|
||||
"scope": "Complete native synthetic improvement measure journey with separate preparer, responsible and independent reviewer",
|
||||
"manifest_sha256": "872018a819feaff11a0d30a7592246e435171470de01499efd30010e65fc60f9",
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"evaluation_id": 1,
|
||||
"evaluation_screen_approved_version_before_and_after": 3,
|
||||
"measure_id": 2,
|
||||
"created_by": "QA reviewer",
|
||||
"responsible": "QA head",
|
||||
"independent_reviewer": "QA finance",
|
||||
"due_on": "2026-12-06",
|
||||
"date_entered_and_confirmed_through_native_segments": true,
|
||||
"created_status": "open",
|
||||
"created_version": 1,
|
||||
"missing_evidence_keeps_submit_disabled": true,
|
||||
"progress_saved_version": 2,
|
||||
"submitted_for_review_version": 3,
|
||||
"responsible_has_no_self_close_command": true,
|
||||
"empty_review_reason_keeps_close_disabled": true,
|
||||
"closed_version": 4,
|
||||
"final_status": "closed",
|
||||
"history_total_including_previous_measure": 7,
|
||||
"reload_preserves_result_evidence_reviewer_reason_status": true,
|
||||
"closed_without_residual_warning": true,
|
||||
"no_mobile_or_print_delta": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"product_changes_in_this_delta": false,
|
||||
"financial_or_external_actions": false,
|
||||
"limits": [
|
||||
"Native browser coverage for the described synthetic path only, no overall business acceptance",
|
||||
"Previous date-picker limitation does not prevent this observed keyboard segment route; no OS picker success claimed"
|
||||
]
|
||||
},
|
||||
"supplier_evaluation_section_navigation_delta_20261129": {
|
||||
"scope": "Conditional supplier evaluation section shortcuts with existing authority and report boundaries",
|
||||
"implementation": {
|
||||
"closed_by_default": true,
|
||||
"hidden_in_print": true,
|
||||
"focusable_panel_targets": true,
|
||||
"existing_panel_sticky_header_offset": true,
|
||||
"sections": [
|
||||
"evidence",
|
||||
"last review when present",
|
||||
"independent review when permitted",
|
||||
"new revision when permitted",
|
||||
"history outside report-only",
|
||||
"improvements",
|
||||
"responses"
|
||||
],
|
||||
"no_business_logic_or_grants_changed": true
|
||||
},
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 23,
|
||||
"files": 4,
|
||||
"passed": true
|
||||
},
|
||||
"types": true,
|
||||
"scoped_check": true,
|
||||
"private_build": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"approved_evaluation": 1,
|
||||
"closed_disclosure_observed": true,
|
||||
"five_present_links_confirmed": true,
|
||||
"improvements_link_lands_with_title_below_header": true,
|
||||
"responses_link_lands_with_title_below_header": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"no_new_mobile_or_print_review": true,
|
||||
"mobile_diagnosis": "Keyboard shortcuts previously did not open tools; visible browser More tools submenu confirmed command available but its native geometry lies outside main window. Separate screenshot coordinate click timed out and submenu keyboard fallback did not open tools. This front stopped; original user tab preserved.",
|
||||
"qa_tab_closed": true
|
||||
},
|
||||
"manifest_sha256": "c4d051ccb0f5de3f52f101d0f0256eb993f42e48e8f14ea7afb5fa4dbd60299c",
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"full_product_complete": false
|
||||
},
|
||||
"native_narrow_window_navigation_delta_20261129": {
|
||||
"scope": "Native independent narrow-window alternative after unavailable device tools, not 390px emulation",
|
||||
"manifest_sha256": "c4d051ccb0f5de3f52f101d0f0256eb993f42e48e8f14ea7afb5fa4dbd60299c",
|
||||
"native": {
|
||||
"browser": "Edge separate owned window",
|
||||
"outer_window_image_width_px": 502,
|
||||
"outer_window_image_height_px": 998,
|
||||
"css_viewport_width_not_measured": true,
|
||||
"original_window_bounds_unchanged": true,
|
||||
"closed_disclosure_observed": true,
|
||||
"all_five_section_links_single_column_readable": true,
|
||||
"response_anchor_title_below_header": true,
|
||||
"response_content_readable_without_observed_lateral_cut": true,
|
||||
"adapted_menu_opens_and_fits": true,
|
||||
"contract_search_returns_existing_supply_destination": true,
|
||||
"selecting_result_closes_menu_and_opens_agreements": true,
|
||||
"linked_contract_workspace_labels_reference_and_separated_links_readable": true,
|
||||
"no_business_save_or_decision": true,
|
||||
"owned_window_closed_and_original_windows_inventory_preserved": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": [
|
||||
"This supersedes lack of narrow-window evidence only for the described views",
|
||||
"390px device emulation remains unverified in this delta",
|
||||
"Earlier historical 390px proofs retain their original scope"
|
||||
]
|
||||
},
|
||||
"native_mobile_navigation_completion_delta_20261129": {
|
||||
"status": "Native responsive review passed",
|
||||
"manifest_sha256": "419da03364bc40805c1e0728b008a8af9bf14bf179e9b271cab6b97799bb8174",
|
||||
"private_root": "storage/framework/testing/rq01-ledger-qa-17db8e4d1176",
|
||||
"viewport": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"scale_percent": 100
|
||||
},
|
||||
"evaluation": {
|
||||
"closed_by_default": true,
|
||||
"five_links_single_column": true,
|
||||
"improvements_heading_below_sticky_header": true,
|
||||
"response_heading_below_sticky_header": true,
|
||||
"approved_version_3_preserved": true
|
||||
},
|
||||
"contracts": {
|
||||
"menu_search": "contratos",
|
||||
"single_existing_destination": "Fornecimento habitual",
|
||||
"adapted_drawer_closes_after_navigation": true,
|
||||
"agreements_to_contracts_link_followed": true,
|
||||
"header_links_separated_and_wrapped": true,
|
||||
"new_label": "Novo contrato com vários artigos",
|
||||
"document_title": "Contrato QA-VISUAL-CONTRACT",
|
||||
"readable_without_horizontal_page_overflow": true
|
||||
},
|
||||
"urgent_deadline": {
|
||||
"route": "/requisicoes/6/prazos",
|
||||
"configured_synthetic_minutes": 5,
|
||||
"stage_started_local": "29/11/2026 04:12:15",
|
||||
"expires_local": "29/11/2026 04:17:15",
|
||||
"reduced_urgency_explanation_visible": true,
|
||||
"no_deadline_command_executed": true,
|
||||
"no_stock_minimum_reduction_test_in_this_pass": true
|
||||
},
|
||||
"cleanup": {
|
||||
"old_orphan_owned_window_closed": true,
|
||||
"new_owned_tools_and_window_closed": true,
|
||||
"original_windows_preserved": true,
|
||||
"isolated_database_removed": true,
|
||||
"isolated_role_removed": true
|
||||
},
|
||||
"operational_changes": false,
|
||||
"limits": "Responsive emulation, not physical phone acceptance; responsibility copy issue observed separately and corrected after this preview."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,5 +16,139 @@
|
||||
"synthetic_example_only": true,
|
||||
"external_messages_sent": 0,
|
||||
"financial_commands": 0,
|
||||
"visual_review": false
|
||||
"visual_review": false,
|
||||
"native_nonempty_followup_delta_20261129": {
|
||||
"scope": "Nonempty synthetic follow-up through existing native services; no actual supplier decision or external communication",
|
||||
"fixture": {
|
||||
"evaluation_id": 1,
|
||||
"version": 3,
|
||||
"route": "/fornecedores/avaliacoes/1",
|
||||
"report_route": "/fornecedores/avaliacoes/1/relatorio",
|
||||
"synthetic_only": true,
|
||||
"native_service_transitions": true,
|
||||
"period_contains_issued_order": true,
|
||||
"order_issued_on": "2026-11-28",
|
||||
"measure_id": 1,
|
||||
"measure_state": "closed",
|
||||
"response_id": 1,
|
||||
"response_state": "decided",
|
||||
"approved_evaluation_preserved": true
|
||||
},
|
||||
"manifest_sha256": "b695d6e2652bd3eac178e02264fe2314052df67ec5ce1078f474a92a9e0aa716",
|
||||
"native": {
|
||||
"desktop_measure_state": "Encerrada",
|
||||
"measure_version": 3,
|
||||
"responsible": "QA head",
|
||||
"measure_independent_reviewer": "QA finance",
|
||||
"measure_result_and_evidence_visible": true,
|
||||
"response_state": "Conclusão registada",
|
||||
"response_version": 3,
|
||||
"response_outcome": "Argumentos acolhidos",
|
||||
"response_source_arguments_reviewer_followup_and_reference_visible": true,
|
||||
"mobile": {
|
||||
"width": 390,
|
||||
"height": 526,
|
||||
"nonempty_measure_and_response_readable": true
|
||||
},
|
||||
"print_pages": 3,
|
||||
"print_measure_whole": true,
|
||||
"print_response_whole": true,
|
||||
"print_response_section_intro_on_previous_page": true,
|
||||
"print_cancelled": true,
|
||||
"physical_print": false
|
||||
},
|
||||
"preservation": {
|
||||
"native_fixture_compared_approved_evaluation_before_after": true,
|
||||
"approval_original_unchanged": true,
|
||||
"financial_or_stock_writer_added": false,
|
||||
"external_message_sent": false
|
||||
},
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_tab_closed": true,
|
||||
"original_tab_preserved": true
|
||||
},
|
||||
"limits": "This covers consultation and report of existing native closed/decided synthetic records; full browser editing/return/correction and external communication evidence remain separate. No pilot/SGF activation or business acceptance."
|
||||
},
|
||||
"native_response_return_cycle_delta_20261129": {
|
||||
"scope": "Native synthetic response creation, required-date refusal, independent return, author correction and resubmission; no external message or real supplier decision",
|
||||
"manifest_sha256": "084b3d39114f9e7a4b5307c2242bbf98a1add5ae17251c1a6f515866cfb1ecfe",
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"evaluation_id": 1,
|
||||
"evaluation_approved_version_before_and_after": 3,
|
||||
"response_id": 2,
|
||||
"created_version": 1,
|
||||
"missing_date_submit_refused": true,
|
||||
"arguments_preserved_after_refusal": true,
|
||||
"native_date_segments_completed_and_confirmed": "2026-11-28",
|
||||
"saved_complete_version": 2,
|
||||
"first_submitted_version": 3,
|
||||
"independent_finance_returned_version": 4,
|
||||
"return_reason_visible_to_author": true,
|
||||
"author_corrected_source_reference_version": 5,
|
||||
"resubmitted_version": 6,
|
||||
"final_state": "review",
|
||||
"history_total_including_other_response": 9,
|
||||
"no_final_decision_in_this_delta": true,
|
||||
"closed_without_residual_warning": true,
|
||||
"no_mobile_or_print_delta": true
|
||||
},
|
||||
"frontend_cross_block": {
|
||||
"files": 92,
|
||||
"tests": 448,
|
||||
"passed": true,
|
||||
"overlaps_targeted_results_do_not_sum": true
|
||||
},
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"original_browser_tab_preserved": true,
|
||||
"operational_changes": false
|
||||
}
|
||||
},
|
||||
"native_response_conclusion_delta_20261129": {
|
||||
"scope": "Native independent synthetic response conclusion; does not extend real reviewer authority or communicate externally",
|
||||
"fixture": {
|
||||
"pending_response_id": 2,
|
||||
"status": "review",
|
||||
"version": 2,
|
||||
"created_and_submitted_by_native_services": true,
|
||||
"approved_evaluation_attributes_preserved_by_fixture": true,
|
||||
"period_matches_fixture_order": true
|
||||
},
|
||||
"native": {
|
||||
"browser": "Edge desktop",
|
||||
"reviewer": "QA finance",
|
||||
"missing_followup_refused_with_visible_error": true,
|
||||
"chosen_outcome_and_reason_preserved": true,
|
||||
"completed_followup_and_fake_response_reference": true,
|
||||
"final_status": "decided",
|
||||
"final_version": 3,
|
||||
"history_total_including_previous_response": 6,
|
||||
"reload_persists_outcome_reason_followup_reference_and_reviewer": true,
|
||||
"evaluation_screen_remains_approved_version": 3,
|
||||
"closed_without_residual_warning": true,
|
||||
"no_mobile_or_print_delta": true
|
||||
},
|
||||
"verification": {
|
||||
"fixture_php_syntax": true,
|
||||
"fixture_pint": true,
|
||||
"private_runtime_frozen_and_verified": true,
|
||||
"new_product_changes": false,
|
||||
"no_rebuild_required": true
|
||||
},
|
||||
"manifest_sha256": "872018a819feaff11a0d30a7592246e435171470de01499efd30010e65fc60f9",
|
||||
"cleanup": {
|
||||
"qa_database_removed": true,
|
||||
"qa_role_removed": true,
|
||||
"user_original_tab_preserved": true,
|
||||
"operational_changes": false
|
||||
},
|
||||
"limits": [
|
||||
"Separate disposable preview from the preceding native return/correction cycle; do not claim both occurred on the same persisted record",
|
||||
"No real supplier decision, message, final business acceptance or deployment"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,58 @@
|
||||
"automatic_purchase_generation_implemented": false,
|
||||
"physical_reservation_implemented": false,
|
||||
"visual_browser_review": false,
|
||||
"grants_changed": false
|
||||
"grants_changed": false,
|
||||
"availability_reading_delta_20261128": {
|
||||
"status": "implemented_and_verified_in_isolated_qa",
|
||||
"change": [
|
||||
"Replaced historical not-implemented notice with actual reservation capability.",
|
||||
"Reservation service unavailable means commitment and free balance remain null, not an assumed zero commitment.",
|
||||
"The minimum signal uses the same known free balance; physical movements and reservation writers are unchanged."
|
||||
],
|
||||
"verification": {
|
||||
"sqlite": {
|
||||
"tests": 3,
|
||||
"assertions": 59
|
||||
},
|
||||
"postgresql": {
|
||||
"tests": 56,
|
||||
"assertions": 921,
|
||||
"proof": "warehouse-drafts-pg.json",
|
||||
"concurrency_scenarios": [
|
||||
"same_operation",
|
||||
"different_operations"
|
||||
],
|
||||
"database_removed": true
|
||||
},
|
||||
"frontend": {
|
||||
"tests": 7,
|
||||
"files": 2,
|
||||
"initial_failure": "Own newly inserted accented UI strings were corrupted by shell transport; corrected using Unicode-safe patch and verified by regression.",
|
||||
"final": "passed"
|
||||
},
|
||||
"types": true,
|
||||
"scoped_format_lint": true,
|
||||
"phpstan_errors": 0,
|
||||
"build": true,
|
||||
"native": {
|
||||
"desktop": true,
|
||||
"warehouse": "ARM-TEST",
|
||||
"source": "synthetic",
|
||||
"physical_milli": 0,
|
||||
"reserved_milli": 0,
|
||||
"free_milli": 0,
|
||||
"actual_reservation_explanation_visible": true,
|
||||
"unavailable_branch": "backend and frontend regression; native active schema only"
|
||||
}
|
||||
},
|
||||
"manifest_sha256": "1beb4e59adb659352e0e0bab5ec6b90ef29772acb6554288d317a9d3fefda2e2",
|
||||
"cleanup": {
|
||||
"database_removed": true,
|
||||
"role_removed": true,
|
||||
"own_browser_tab_closed": true,
|
||||
"original_user_tab_preserved": true
|
||||
},
|
||||
"real_operational_changes": false,
|
||||
"limits": "No installation, activation, grants, stock writer change or integral product acceptance. Top-level false fields describe the historical 1 November proof, superseded only by this dated delta."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"checked_at": "2026-11-02T06:24:01+00:00",
|
||||
"checked_at": "2026-11-28T21:22:40+00:00",
|
||||
"database": "disposable PostgreSQL",
|
||||
"result": "{\"tool\":\"pest\",\"result\":\"passed\",\"tests\":24,\"passed\":24,\"assertions\":232,\"duration_ms\":20682}",
|
||||
"result": "{\"tool\":\"pest\",\"result\":\"passed\",\"tests\":56,\"passed\":56,\"assertions\":921,\"duration_ms\":62510}",
|
||||
"races": [
|
||||
{
|
||||
"scenario": "same_operation",
|
||||
|
||||
@@ -6,7 +6,9 @@ export function InventoryNotice() {
|
||||
return (
|
||||
<div className="rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-100">
|
||||
Ambiente de desenvolvimento. Não autoriza compras reais.{' '}
|
||||
<strong>O orçamento ainda não é validado.</strong>
|
||||
<strong>
|
||||
Esta operação física não certifica a validação orçamental.
|
||||
</strong>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
|
||||
export type RelatedProcess = { id: number; number: string; href: string };
|
||||
|
||||
/** Links supplied by the native page; the server retains authority over every destination. */
|
||||
export function OrderDocumentLinks({
|
||||
receiptsHref = null,
|
||||
financialDocumentsHref = null,
|
||||
relatedProcesses = [],
|
||||
}: {
|
||||
receiptsHref?: string | null;
|
||||
financialDocumentsHref?: string | null;
|
||||
relatedProcesses?: RelatedProcess[];
|
||||
}) {
|
||||
if (
|
||||
!receiptsHref &&
|
||||
!financialDocumentsHref &&
|
||||
relatedProcesses.length === 0
|
||||
)
|
||||
return null;
|
||||
return (
|
||||
<nav
|
||||
aria-label="Documentos relacionados da ordem"
|
||||
className="rounded-xl border bg-card p-4"
|
||||
>
|
||||
<ul className="flex flex-wrap gap-x-6 gap-y-3 text-sm font-medium">
|
||||
{relatedProcesses.map((process) => (
|
||||
<li key={process.id}>
|
||||
<Link
|
||||
className="underline underline-offset-4"
|
||||
href={process.href}
|
||||
>
|
||||
Processo {process.number}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
{receiptsHref && (
|
||||
<li>
|
||||
<Link
|
||||
className="underline underline-offset-4"
|
||||
href={receiptsHref}
|
||||
>
|
||||
Recepções, qualidade e quantidades pendentes
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
{financialDocumentsHref && (
|
||||
<li>
|
||||
<Link
|
||||
className="underline underline-offset-4"
|
||||
href={financialDocumentsHref}
|
||||
>
|
||||
Facturas e pagamentos desta ordem
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
import type { ProcurementGroup } from '@/lib/procurement-navigation';
|
||||
|
||||
export function ProcurementMenuResults({
|
||||
groups,
|
||||
dashboard,
|
||||
onNavigate,
|
||||
onEscape,
|
||||
}: {
|
||||
groups: ProcurementGroup[];
|
||||
dashboard: boolean;
|
||||
onNavigate: () => void;
|
||||
onEscape: () => void;
|
||||
}) {
|
||||
const count = groups.reduce(
|
||||
(total, group) => total + group.entries.length,
|
||||
dashboard ? 1 : 0,
|
||||
);
|
||||
const linkClass =
|
||||
'block rounded-md px-3 py-2 text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-2 focus-visible:outline-ring';
|
||||
return (
|
||||
<section
|
||||
id="sgc-menu-results"
|
||||
aria-label="Resultados da pesquisa do menu"
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === 'Escape') {
|
||||
event.preventDefault();
|
||||
onEscape();
|
||||
}
|
||||
}}
|
||||
className="absolute top-full left-0 z-50 mt-2 max-h-[min(65vh,32rem)] w-[min(36rem,calc(100vw-2rem))] overflow-y-auto rounded-xl border bg-popover p-2 text-popover-foreground shadow-lg"
|
||||
>
|
||||
<p
|
||||
role="status"
|
||||
className="px-3 py-2 text-sm text-muted-foreground"
|
||||
>
|
||||
{count
|
||||
? `${count} ${count === 1 ? 'opção disponível' : 'opções disponíveis'}.`
|
||||
: 'Nenhuma opção encontrada. Tente outra palavra.'}
|
||||
</p>
|
||||
{dashboard && (
|
||||
<Link
|
||||
href="/dashboard"
|
||||
className={linkClass}
|
||||
onClick={onNavigate}
|
||||
>
|
||||
Painel inicial
|
||||
</Link>
|
||||
)}
|
||||
{groups.map((group) => (
|
||||
<div key={group.id}>
|
||||
<h2 className="px-3 pt-3 pb-1 text-xs font-semibold text-muted-foreground">
|
||||
{group.label}
|
||||
</h2>
|
||||
<ul>
|
||||
{group.entries.map((entry) => (
|
||||
<li key={entry.id}>
|
||||
{entry.fullPage ? (
|
||||
<a
|
||||
href={entry.path}
|
||||
className={linkClass}
|
||||
onClick={onNavigate}
|
||||
>
|
||||
{entry.label}
|
||||
<span className="block text-xs text-muted-foreground">
|
||||
{entry.section ?? group.label}
|
||||
</span>
|
||||
</a>
|
||||
) : (
|
||||
<Link
|
||||
href={entry.path}
|
||||
className={linkClass}
|
||||
onClick={onNavigate}
|
||||
>
|
||||
{entry.label}
|
||||
<span className="block text-xs text-muted-foreground">
|
||||
{entry.section ?? group.label}
|
||||
</span>
|
||||
</Link>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -124,8 +124,9 @@ export function Panel({
|
||||
return (
|
||||
<section
|
||||
id={id}
|
||||
tabIndex={id ? -1 : undefined}
|
||||
aria-labelledby={headingId}
|
||||
className="sgc-panel min-w-0 scroll-mt-24 rounded-xl border bg-card p-4 shadow-xs sm:p-5 print:rounded-none print:shadow-none"
|
||||
className="sgc-panel min-w-0 scroll-mt-24 rounded-xl border bg-card p-4 shadow-xs sm:p-5 lg:scroll-mt-72 print:rounded-none print:shadow-none"
|
||||
>
|
||||
<h2
|
||||
id={headingId}
|
||||
@@ -160,14 +161,20 @@ export function Status({ value }: { value: string }) {
|
||||
</Badge>
|
||||
);
|
||||
}
|
||||
export function RequisitionTable({ rows }: { rows: Requisition[] }) {
|
||||
export function RequisitionTable({
|
||||
rows,
|
||||
emptyDescription = 'Não existem pedidos disponíveis neste conjunto para o seu perfil.',
|
||||
}: {
|
||||
rows: Requisition[];
|
||||
emptyDescription?: string;
|
||||
}) {
|
||||
if (!rows.length)
|
||||
return (
|
||||
<div className="py-12 text-center">
|
||||
<ClipboardList className="mx-auto mb-3 size-9 text-muted-foreground/50" />
|
||||
<p className="font-medium">Sem requisições para apresentar</p>
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
Os pedidos de compra aparecem aqui depois de criados.
|
||||
{emptyDescription}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Link, router, useForm, usePage, useRemember } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { FormErrors, Panel, controlClass } from '@/components/procurement';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
|
||||
type SavedSearch = {
|
||||
id: number;
|
||||
@@ -21,24 +21,6 @@ export type SavedSearches = {
|
||||
};
|
||||
};
|
||||
|
||||
function usePrivatePreparation(dirty: boolean) {
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const form = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', { detail: { form, dirty } }),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [dirty]);
|
||||
return ref;
|
||||
}
|
||||
|
||||
function SavedSearchRow({
|
||||
row,
|
||||
term,
|
||||
@@ -58,7 +40,7 @@ function SavedSearchRow({
|
||||
q: term,
|
||||
});
|
||||
const action = useForm({ version: row.version, q: term });
|
||||
const ref = usePrivatePreparation(editing && edit.isDirty);
|
||||
const ref = usePreparationDirty(editing && edit.isDirty);
|
||||
const endpoint = `/compras/pesquisas-guardadas/${row.id}`;
|
||||
return (
|
||||
<li className="grid min-w-0 grid-cols-1 gap-3 border-b py-4 last:border-0">
|
||||
@@ -185,7 +167,7 @@ export function SavedProcurementSearches({
|
||||
`saved-search:${actor?.tenant_id ?? 'none'}:${actor?.id ?? 'none'}:${term}`,
|
||||
{ name: '', term, q: term },
|
||||
);
|
||||
const ref = usePrivatePreparation(create.data.name !== '');
|
||||
const ref = usePreparationDirty(create.data.name !== '');
|
||||
return (
|
||||
<Panel title="As minhas pesquisas guardadas">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Search,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { Fragment, useEffect, useState } from 'react';
|
||||
import { Fragment, useEffect, useRef, useState } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
@@ -32,6 +32,12 @@ import {
|
||||
import { roleLabels } from '@/types/procurement';
|
||||
import type { WorkContextState } from '@/types/work-context';
|
||||
import { WorkContextChange } from '@/components/work-context-change';
|
||||
import { ProcurementMenuResults } from '@/components/procurement-menu-results';
|
||||
import {
|
||||
matchesMenuSearch,
|
||||
normalizeMenuText,
|
||||
searchProcurementMenu,
|
||||
} from '@/lib/procurement-menu-search';
|
||||
|
||||
export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
const page = usePage();
|
||||
@@ -41,6 +47,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
| undefined;
|
||||
const [mobileOpen, setMobileOpen] = useState(false);
|
||||
const [search, setSearch] = useState('');
|
||||
const desktopSearch = useRef<HTMLInputElement>(null);
|
||||
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
|
||||
const access = page.props.organizationAccess as {
|
||||
active: boolean;
|
||||
@@ -55,6 +62,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
page.props.orderCancellationAvailable === true,
|
||||
page.props.operationalOrdersAvailable === true,
|
||||
page.props.privateAuditAvailable === true,
|
||||
page.props.capitalRegisterAvailable === true,
|
||||
).flatMap((group) => group.entries.map((entry) => entry.id)),
|
||||
);
|
||||
const groups = procurementNavigation(
|
||||
@@ -64,6 +72,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
page.props.orderCancellationAvailable === true,
|
||||
page.props.operationalOrdersAvailable === true,
|
||||
page.props.privateAuditAvailable === true,
|
||||
page.props.capitalRegisterAvailable === true,
|
||||
)
|
||||
.map((group) => ({
|
||||
...group,
|
||||
@@ -91,28 +100,13 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
: { ...previous, [activeGroupId]: true },
|
||||
);
|
||||
}, [activeId, activeGroupId]);
|
||||
const normalize = (text: string) =>
|
||||
text
|
||||
.normalize('NFD')
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.toLocaleLowerCase('pt');
|
||||
const normalize = normalizeMenuText;
|
||||
const query = normalize(search.trim());
|
||||
const visibleGroups = groups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
entries: group.entries.filter(
|
||||
(entry) =>
|
||||
!query ||
|
||||
normalize(
|
||||
group.label +
|
||||
' ' +
|
||||
(entry.section ?? '') +
|
||||
' ' +
|
||||
entry.label,
|
||||
).includes(query),
|
||||
),
|
||||
}))
|
||||
.filter((group) => group.entries.length);
|
||||
const visibleGroups = searchProcurementMenu(groups, query);
|
||||
const closeSearch = () => {
|
||||
setSearch('');
|
||||
desktopSearch.current?.focus();
|
||||
};
|
||||
const navigate = () => {
|
||||
setMobileOpen(false);
|
||||
setSearch('');
|
||||
@@ -145,12 +139,22 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<input
|
||||
ref={mobile ? undefined : desktopSearch}
|
||||
type="search"
|
||||
aria-label="Procurar no menu"
|
||||
placeholder="Procurar no menu…"
|
||||
value={search}
|
||||
onChange={(event) => setSearch(event.target.value)}
|
||||
className={`h-10 w-full rounded-lg border pr-9 pl-9 text-sm outline-none focus:border-red-400 focus:ring-2 focus:ring-red-400/20 ${mobile ? 'border-white/15 bg-white/5 text-white placeholder:text-slate-400' : 'border-border bg-background text-foreground'}`}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === 'Escape') {
|
||||
event.preventDefault();
|
||||
closeSearch();
|
||||
}
|
||||
}}
|
||||
aria-controls={
|
||||
!mobile && query ? 'sgc-menu-results' : undefined
|
||||
}
|
||||
className={`h-10 w-full rounded-lg border pr-9 pl-9 text-sm outline-none focus:border-red-400 focus:ring-2 focus:ring-red-400/20 [&::-webkit-search-cancel-button]:hidden ${mobile ? 'border-white/15 bg-white/5 text-white placeholder:text-slate-400' : 'border-border bg-background text-foreground'}`}
|
||||
/>
|
||||
{search && (
|
||||
<button
|
||||
@@ -162,6 +166,17 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
<X className="size-4" />
|
||||
</button>
|
||||
)}
|
||||
{!mobile && query && (
|
||||
<ProcurementMenuResults
|
||||
groups={visibleGroups}
|
||||
dashboard={matchesMenuSearch(
|
||||
'Painel inicial Visão geral',
|
||||
query,
|
||||
)}
|
||||
onNavigate={navigate}
|
||||
onEscape={closeSearch}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
const navigation = (
|
||||
@@ -173,7 +188,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
ESPAÇO DE TRABALHO
|
||||
</p>
|
||||
{(!query ||
|
||||
normalize('Painel inicial Visão geral').includes(query)) && (
|
||||
matchesMenuSearch('Painel inicial Visão geral', query)) && (
|
||||
<Link
|
||||
href="/dashboard"
|
||||
onClick={navigate}
|
||||
@@ -273,12 +288,12 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
))}
|
||||
{query &&
|
||||
visibleGroups.length === 0 &&
|
||||
!normalize('Painel inicial Visão geral').includes(query) && (
|
||||
!matchesMenuSearch('Painel inicial Visão geral', query) && (
|
||||
<p
|
||||
role="status"
|
||||
className="px-3 py-5 text-sm text-slate-400"
|
||||
>
|
||||
Nenhuma opção encontrada. Tenta outra palavra.
|
||||
Nenhuma opção encontrada. Tente outra palavra.
|
||||
</p>
|
||||
)}
|
||||
</nav>
|
||||
@@ -359,10 +374,7 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
aria-label="Navegação principal horizontal"
|
||||
className="flex min-w-0 flex-1 flex-wrap items-center gap-1 px-3 py-3"
|
||||
>
|
||||
{(!query ||
|
||||
normalize(
|
||||
'Painel inicial Visão geral',
|
||||
).includes(query)) && (
|
||||
{
|
||||
<Link
|
||||
href="/dashboard"
|
||||
onClick={navigate}
|
||||
@@ -379,8 +391,8 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
/>
|
||||
Painel inicial
|
||||
</Link>
|
||||
)}
|
||||
{visibleGroups.map((group) => (
|
||||
}
|
||||
{groups.map((group) => (
|
||||
<DropdownMenu key={group.id}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
@@ -451,15 +463,6 @@ export function SgcWorkspaceShell({ children }: { children: ReactNode }) {
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
))}
|
||||
{query &&
|
||||
visibleGroups.length === 0 &&
|
||||
!normalize(
|
||||
'Painel inicial Visão geral',
|
||||
).includes(query) && (
|
||||
<p className="px-3 py-2 text-sm text-slate-400">
|
||||
Nenhuma opção encontrada.
|
||||
</p>
|
||||
)}
|
||||
</nav>
|
||||
</div>
|
||||
<div className="flex min-h-18 items-center justify-between gap-4 px-5 py-3 lg:px-8">
|
||||
|
||||
@@ -465,7 +465,10 @@ function ImprovementContent({
|
||||
(m) => m.status !== 'closed' && m.due_on < data.today,
|
||||
).length;
|
||||
return (
|
||||
<Panel title="Medidas de melhoria e acompanhamento">
|
||||
<Panel
|
||||
id="evaluation-improvements"
|
||||
title="Medidas de melhoria e acompanhamento"
|
||||
>
|
||||
<div className="space-y-5">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Acompanhamento associado a esta revisão, consultado em{' '}
|
||||
|
||||
@@ -437,7 +437,7 @@ function ResponseContent({
|
||||
};
|
||||
const base = `/fornecedores/avaliacoes/${evaluationId}/contraditorios`;
|
||||
return (
|
||||
<Panel title="Contraditório do fornecedor">
|
||||
<Panel id="evaluation-responses" title="Contraditório do fornecedor">
|
||||
<div className="space-y-5">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Documentos e argumentos recebidos, registados pela equipa.
|
||||
|
||||
@@ -5,6 +5,7 @@ import { protectDepartures } from '@/lib/unsaved-navigation';
|
||||
import {
|
||||
connectedDirtyForms,
|
||||
markPreparationDirty,
|
||||
usesGenericPreparationTracking,
|
||||
} from '@/lib/preparation-forms';
|
||||
import {
|
||||
Dialog,
|
||||
@@ -31,7 +32,7 @@ export function WorkContextChange() {
|
||||
!(event.detail.form instanceof HTMLFormElement)
|
||||
)
|
||||
return;
|
||||
markPreparationDirty(event.detail.form, !!event.detail.dirty);
|
||||
markPreparationDirty(event.detail.form, !!event.detail.dirty, true);
|
||||
if (event.detail.dirty) dirty.current.add(event.detail.form);
|
||||
else dirty.current.delete(event.detail.form);
|
||||
};
|
||||
@@ -42,7 +43,7 @@ export function WorkContextChange() {
|
||||
input instanceof HTMLTextAreaElement ||
|
||||
input instanceof HTMLSelectElement
|
||||
) {
|
||||
if (input.form) {
|
||||
if (input.form && usesGenericPreparationTracking(input.form)) {
|
||||
markPreparationDirty(input.form, true);
|
||||
dirty.current.add(input.form);
|
||||
}
|
||||
|
||||
@@ -7,14 +7,14 @@ export function usePreparationDirty(dirty: boolean, visible = true) {
|
||||
useEffect(() => {
|
||||
const form = ref.current;
|
||||
if (!form) return;
|
||||
markPreparationDirty(form, visible && dirty);
|
||||
markPreparationDirty(form, visible && dirty, true);
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form, dirty: visible && dirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
markPreparationDirty(form, false);
|
||||
markPreparationDirty(form, false, true);
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form, dirty: false },
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
export function markPreparationDirty(
|
||||
form: HTMLFormElement,
|
||||
dirty: boolean,
|
||||
managed = false,
|
||||
): void {
|
||||
form.setAttribute('data-preparation-dirty', dirty ? 'true' : 'false');
|
||||
if (managed) form.setAttribute('data-preparation-managed', 'true');
|
||||
// Explicit query forms change consultation criteria, not a business preparation.
|
||||
form.setAttribute(
|
||||
'data-preparation-dirty',
|
||||
dirty && form.getAttribute('data-query-form') !== 'true'
|
||||
? 'true'
|
||||
: 'false',
|
||||
);
|
||||
}
|
||||
|
||||
/** A form that publishes its own dirty state owns clearing and restoring it. */
|
||||
export function usesGenericPreparationTracking(form: HTMLFormElement): boolean {
|
||||
return (
|
||||
form.getAttribute('data-query-form') !== 'true' &&
|
||||
form.getAttribute('data-preparation-managed') !== 'true'
|
||||
);
|
||||
}
|
||||
|
||||
/** Recover restored preparations even when their effect ran before the guard subscribed. */
|
||||
@@ -20,6 +36,7 @@ export function connectedDirtyForms(
|
||||
].filter(
|
||||
(form) =>
|
||||
form.isConnected &&
|
||||
form.getAttribute('data-query-form') !== 'true' &&
|
||||
form.getAttribute('data-preparation-dirty') !== 'false',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
import type { ProcurementGroup } from '@/lib/procurement-navigation';
|
||||
|
||||
const terms: Record<string, string> = {
|
||||
supply_agreements:
|
||||
'acordo acordos contrato contratos vigência fornecimento',
|
||||
supply_imports:
|
||||
'importação alfândega aduaneira despachante transitário pauta',
|
||||
receipts: 'receber entrega recepção divergência',
|
||||
operational_orders: 'produção manutenção oficina ordem',
|
||||
capital_register:
|
||||
'projecto projeto imobilizado activo ativo património cadastro',
|
||||
my_workflow_tasks: 'tarefa pendência próxima acção',
|
||||
pending_approvals: 'aprovar aprovação decidir decisão',
|
||||
suppliers: 'fornecedor cadastro documento',
|
||||
supplier_evaluations: 'avaliar avaliação fornecedor',
|
||||
invoices: 'factura conferir conferência fornecedor',
|
||||
payments: 'pagamento liquidar liquidação saldo confirmação',
|
||||
budgets: 'orçamento reforço dotação saldo',
|
||||
stock_operations: 'inventário contagem saída entrega',
|
||||
inventory_lots: 'lote validade quarentena',
|
||||
audit_private: 'auditoria exportar exportação privada',
|
||||
audit_metadata: 'auditoria evento histórico metadados',
|
||||
};
|
||||
|
||||
export const normalizeMenuText = (value: string) =>
|
||||
value
|
||||
.normalize('NFD')
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.toLocaleLowerCase('pt');
|
||||
|
||||
export const matchesMenuSearch = (text: string, query: string) => {
|
||||
const haystack = normalizeMenuText(text);
|
||||
return normalizeMenuText(query)
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.every((word) => haystack.includes(word));
|
||||
};
|
||||
|
||||
/** Search only the already authorised navigation; never introduce a route or grant. */
|
||||
export function searchProcurementMenu(
|
||||
groups: ProcurementGroup[],
|
||||
query: string,
|
||||
): ProcurementGroup[] {
|
||||
return groups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
entries: group.entries.filter((entry) =>
|
||||
matchesMenuSearch(
|
||||
`${group.label} ${entry.section ?? ''} ${entry.label} ${terms[entry.id] ?? ''}`,
|
||||
query,
|
||||
),
|
||||
),
|
||||
}))
|
||||
.filter((group) => group.entries.length > 0);
|
||||
}
|
||||
@@ -35,6 +35,7 @@ export function procurementNavigation(
|
||||
orderCancellation = false,
|
||||
operationalOrders = false,
|
||||
privateAudit = false,
|
||||
capitalRegister = false,
|
||||
): ProcurementGroup[] {
|
||||
const groups: ProcurementGroup[] = [
|
||||
{
|
||||
@@ -42,6 +43,11 @@ export function procurementNavigation(
|
||||
label: 'Requisições',
|
||||
icon: ClipboardList,
|
||||
entries: [
|
||||
{
|
||||
id: 'my_workflow_tasks',
|
||||
label: 'As minhas tarefas',
|
||||
path: '/requisicoes/tarefas',
|
||||
},
|
||||
{
|
||||
id: 'process_search',
|
||||
label: 'Pesquisar processos',
|
||||
@@ -57,11 +63,6 @@ export function procurementNavigation(
|
||||
label: 'Minhas requisições',
|
||||
path: '/requisicoes?view=mine',
|
||||
},
|
||||
{
|
||||
id: 'my_workflow_tasks',
|
||||
label: 'As minhas tarefas',
|
||||
path: '/requisicoes/tarefas',
|
||||
},
|
||||
{
|
||||
id: 'my_drafts',
|
||||
label: 'Os meus rascunhos',
|
||||
@@ -69,7 +70,7 @@ export function procurementNavigation(
|
||||
},
|
||||
{
|
||||
id: 'all_requests',
|
||||
label: 'Todas as autorizadas',
|
||||
label: 'Requisições autorizadas',
|
||||
path: '/requisicoes?view=all',
|
||||
},
|
||||
{ id: 'planning', label: 'Planeamento', path: '/planeamento' },
|
||||
@@ -424,6 +425,12 @@ export function procurementNavigation(
|
||||
path: '/equipamentos',
|
||||
roles: inventory,
|
||||
},
|
||||
{
|
||||
id: 'capital_register',
|
||||
label: 'Projectos e imobilizado',
|
||||
path: '/projectos-imobilizado',
|
||||
roles: inventory,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -557,9 +564,25 @@ export function procurementNavigation(
|
||||
label: 'Compras',
|
||||
icon: ClipboardList,
|
||||
entries: purchasing.flatMap((group) =>
|
||||
group.entries.map((entry) => ({
|
||||
(group.id === 'sourcing'
|
||||
? [
|
||||
...group.entries.filter(
|
||||
(entry) => entry.id !== 'supply_imports',
|
||||
),
|
||||
...group.entries.filter(
|
||||
(entry) => entry.id === 'supply_imports',
|
||||
),
|
||||
]
|
||||
: group.entries
|
||||
).map((entry) => ({
|
||||
...entry,
|
||||
section: group.label,
|
||||
section:
|
||||
entry.id === 'supply_imports'
|
||||
? 'Importação'
|
||||
: group.id === 'sourcing' &&
|
||||
entry.id.startsWith('supply_')
|
||||
? 'Fornecimento e reposição'
|
||||
: group.label,
|
||||
})),
|
||||
),
|
||||
},
|
||||
@@ -596,6 +619,7 @@ export function procurementNavigation(
|
||||
(entry.id !== 'audit_private' || privateAudit) &&
|
||||
(entry.id !== 'operational_orders' ||
|
||||
operationalOrders) &&
|
||||
(entry.id !== 'capital_register' || capitalRegister) &&
|
||||
(entry.id !== 'new_request' ||
|
||||
!Array.isArray(role) ||
|
||||
role.includes('requester')) &&
|
||||
@@ -615,6 +639,29 @@ export function activeProcurementEntry(
|
||||
url: string,
|
||||
): string | undefined {
|
||||
const current = new URL(url, 'http://local');
|
||||
if (
|
||||
(current.pathname === '/compras/acordos/vigencia' ||
|
||||
(current.pathname === '/compras/fornecimento' &&
|
||||
['agreements', 'contracts'].includes(
|
||||
current.searchParams.get('view') ?? 'agreements',
|
||||
))) &&
|
||||
groups.some((group) =>
|
||||
group.entries.some((entry) => entry.id === 'supply_agreements'),
|
||||
)
|
||||
)
|
||||
return 'supply_agreements';
|
||||
if (
|
||||
(/^\/requisicoes\/\d+\/(classificacao-pautal|base-legal|estimativa-importacao)(?:\/|$)/.test(
|
||||
current.pathname,
|
||||
) ||
|
||||
/^\/compras\/importacoes\/\d+\/(custos|documentos|suporte-bancario|acompanhamento)(?:\/|$)/.test(
|
||||
current.pathname,
|
||||
)) &&
|
||||
groups.some((group) =>
|
||||
group.entries.some((entry) => entry.id === 'supply_imports'),
|
||||
)
|
||||
)
|
||||
return 'supply_imports';
|
||||
if (/^\/ordens\/\d+\/recepcoes/.test(current.pathname)) return 'receipts';
|
||||
if (/^\/requisicoes\/\d+\/adjudicacao(?:\/|$)/.test(current.pathname))
|
||||
return 'orders';
|
||||
@@ -644,5 +691,17 @@ export function activeProcurementEntry(
|
||||
return target.pathname.length * 100 + target.searchParams.size;
|
||||
};
|
||||
matches.sort((a, b) => specificity(b.path) - specificity(a.path));
|
||||
if (
|
||||
matches.length === 0 &&
|
||||
/^\/administracao\/(prazos-aprovacao|revisao-urgencias)(?:\/|$)/.test(
|
||||
current.pathname,
|
||||
) &&
|
||||
groups.some((group) =>
|
||||
group.entries.some(
|
||||
(entry) => entry.id === 'organization_parameters',
|
||||
),
|
||||
)
|
||||
)
|
||||
return 'organization_parameters';
|
||||
return matches[0]?.id;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ export default function AuditMetadata({
|
||||
<details className="my-4 rounded border p-3">
|
||||
<summary>Filtrar eventos</summary>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mt-4 grid gap-4 sm:grid-cols-2"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -83,6 +83,7 @@ export default function GeographyReview({
|
||||
</Panel>
|
||||
<Panel title="Pendências da cartografia">
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mb-5 flex flex-wrap items-end gap-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -200,6 +200,7 @@ function ParameterFields({
|
||||
approvalLevels,
|
||||
approvalLevelsReady = false,
|
||||
expiryReady = false,
|
||||
urgentReviewsReady = false,
|
||||
requisitionCategoryOptions = {},
|
||||
companyDetails,
|
||||
companyDetailsReady,
|
||||
@@ -233,6 +234,7 @@ function ParameterFields({
|
||||
approvalLevels?: RequisitionApprovalPlan | null;
|
||||
approvalLevelsReady?: boolean;
|
||||
expiryReady?: boolean;
|
||||
urgentReviewsReady?: boolean;
|
||||
requisitionCategoryOptions?: Record<string, string>;
|
||||
companyDetails: CompanyDetails | null;
|
||||
companyDetailsReady: boolean;
|
||||
@@ -392,8 +394,132 @@ function ParameterFields({
|
||||
return (
|
||||
<>
|
||||
<Head title="Parametrização da aplicação" />
|
||||
<div className="mx-auto max-w-6xl space-y-6 px-5 py-8 lg:px-8">
|
||||
<PageTitle
|
||||
eyebrow="Administração"
|
||||
title="Parametrização da aplicação"
|
||||
description="Defina os perfis da empresa, atribua responsabilidades e mantenha dois administradores permanentes."
|
||||
/>
|
||||
<nav
|
||||
aria-label="Áreas da parametrização"
|
||||
className="rounded-xl border bg-card p-4"
|
||||
>
|
||||
<p className="mb-3 font-semibold">Ir para uma área</p>
|
||||
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{[
|
||||
['company-details', 'Dados da empresa'],
|
||||
['approval-levels', 'Níveis de aprovação'],
|
||||
...(geographyEnabled
|
||||
? [
|
||||
[
|
||||
'company-geography',
|
||||
'Localização administrativa',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(ready
|
||||
? [
|
||||
[
|
||||
'company-activation',
|
||||
'Activação da configuração',
|
||||
],
|
||||
[
|
||||
'company-comparison',
|
||||
'Comparação de propostas',
|
||||
],
|
||||
['company-tax', 'IVA de novas linhas'],
|
||||
[
|
||||
'company-approval-rules',
|
||||
'Regras e limites de aprovação',
|
||||
],
|
||||
[
|
||||
'company-profiles',
|
||||
'Perfis e permissões',
|
||||
],
|
||||
[
|
||||
'company-users',
|
||||
'Utilizadores e atribuições',
|
||||
],
|
||||
[
|
||||
'company-cost-centres',
|
||||
'Organização e centros de custo',
|
||||
],
|
||||
...(intelligencePolicy
|
||||
? [
|
||||
[
|
||||
'company-intelligence',
|
||||
'Inteligência operacional',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(aiPlan
|
||||
? [
|
||||
[
|
||||
'company-ai-plan',
|
||||
'Plano de inteligência artificial',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(workContextConfiguration
|
||||
? [
|
||||
[
|
||||
'company-work-contexts',
|
||||
'Opções contratadas',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
[
|
||||
'company-maintenance',
|
||||
'Manutenção TEMPO',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
].map(([id, label]) => (
|
||||
<li key={id}>
|
||||
<a
|
||||
className="font-medium underline underline-offset-4"
|
||||
href={`#${id}`}
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
<li>
|
||||
<Link
|
||||
className="font-medium underline underline-offset-4"
|
||||
href="/administracao/candidaturas/formularios"
|
||||
>
|
||||
Formulários de inscrições e candidaturas
|
||||
</Link>
|
||||
</li>
|
||||
{expiryReady && (
|
||||
<li>
|
||||
<Link
|
||||
className="font-medium underline underline-offset-4"
|
||||
href="/administracao/prazos-aprovacao"
|
||||
>
|
||||
Prazos, escalamento e expiração
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
{urgentReviewsReady && (
|
||||
<li>
|
||||
<Link
|
||||
className="font-medium underline underline-offset-4"
|
||||
href="/administracao/revisao-urgencias"
|
||||
>
|
||||
Perfis de revisão posterior das urgências
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</nav>
|
||||
{geographyEnabled && (
|
||||
<div className="mx-auto w-full max-w-7xl p-5">
|
||||
<div
|
||||
id="company-geography"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<CompanyAdministrativeLocation geography={geography} />
|
||||
<Link
|
||||
className="mt-4 inline-block font-semibold underline"
|
||||
@@ -403,18 +529,6 @@ function ParameterFields({
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
<Link
|
||||
href="/administracao/candidaturas/formularios"
|
||||
className="m-5 inline-block font-semibold underline"
|
||||
>
|
||||
Formulários de inscrições e candidaturas
|
||||
</Link>
|
||||
<div className="mx-auto max-w-6xl space-y-6 px-5 py-8 lg:px-8">
|
||||
<PageTitle
|
||||
eyebrow="Administração"
|
||||
title="Parametrização da aplicação"
|
||||
description="Defina os perfis da empresa, atribua responsabilidades e mantenha dois administradores permanentes."
|
||||
/>
|
||||
{notice && (
|
||||
<p
|
||||
role="status"
|
||||
@@ -423,15 +537,6 @@ function ParameterFields({
|
||||
{notice}
|
||||
</p>
|
||||
)}
|
||||
{expiryReady && (
|
||||
<Link
|
||||
className="block underline"
|
||||
href="/administracao/prazos-aprovacao"
|
||||
>
|
||||
Configurar prazos, escalamento e expiração das
|
||||
aprovações
|
||||
</Link>
|
||||
)}
|
||||
{activationPreview && (
|
||||
<OrganizationActivationPreview
|
||||
preview={activationPreview}
|
||||
@@ -439,6 +544,11 @@ function ParameterFields({
|
||||
tasks={workflowTasks}
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
id="approval-levels"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<RequisitionApprovalSettings
|
||||
plan={approvalLevels}
|
||||
ready={approvalLevelsReady}
|
||||
@@ -447,11 +557,18 @@ function ParameterFields({
|
||||
costCenters={costCenters}
|
||||
version={version}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
id="company-details"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<CompanyDetailsSettings
|
||||
details={companyDetails}
|
||||
ready={companyDetailsReady && ready}
|
||||
version={version}
|
||||
/>
|
||||
</div>
|
||||
{!ready ? (
|
||||
<Panel title="Instalação pendente">
|
||||
<p>
|
||||
@@ -462,6 +579,7 @@ function ParameterFields({
|
||||
) : (
|
||||
<>
|
||||
<Panel
|
||||
id="company-activation"
|
||||
title={
|
||||
active
|
||||
? 'Parametrização activa'
|
||||
@@ -534,14 +652,25 @@ function ParameterFields({
|
||||
)}
|
||||
</Panel>
|
||||
{intelligencePolicy && (
|
||||
<div
|
||||
id="company-intelligence"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<IntelligenceSettings
|
||||
key={`intelligence-${version}`}
|
||||
policy={intelligencePolicy}
|
||||
version={version}
|
||||
ready={intelligenceReady}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{aiPlan && (
|
||||
<div
|
||||
id="company-ai-plan"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<AiPlanSettings
|
||||
key={`ai-plan-${version}`}
|
||||
plan={aiPlan}
|
||||
@@ -550,15 +679,25 @@ function ParameterFields({
|
||||
version={version}
|
||||
ready={intelligenceReady}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{workContextConfiguration && (
|
||||
<div
|
||||
id="company-work-contexts"
|
||||
tabIndex={-1}
|
||||
className="min-w-0 scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<WorkContextSettings
|
||||
context={workContextConfiguration}
|
||||
enabled={enabledWorkContexts}
|
||||
version={version}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<Panel title="Regras de comparação de propostas">
|
||||
<Panel
|
||||
id="company-comparison"
|
||||
title="Regras de comparação de propostas"
|
||||
>
|
||||
<p className="mb-4 text-sm">
|
||||
{comparisonPolicy.configured
|
||||
? `Revisão ${comparisonPolicy.revision} da empresa.`
|
||||
@@ -731,7 +870,7 @@ function ParameterFields({
|
||||
</Button>
|
||||
</form>
|
||||
</Panel>
|
||||
<Panel title="IVA para novas linhas">
|
||||
<Panel id="company-tax" title="IVA para novas linhas">
|
||||
<p className="mb-4 text-sm">
|
||||
Taxa inicial para novas linhas de requisição.
|
||||
Pode ser ajustada em cada artigo conforme o
|
||||
@@ -794,7 +933,10 @@ function ParameterFields({
|
||||
</Button>
|
||||
</form>
|
||||
</Panel>
|
||||
<Panel title="Regras de aprovação da empresa">
|
||||
<Panel
|
||||
id="company-approval-rules"
|
||||
title="Regras de aprovação da empresa"
|
||||
>
|
||||
<p className="mb-4 text-sm">
|
||||
{companyRules.provisional
|
||||
? 'Os valores actuais são provisórios; confirme e guarde as regras da empresa.'
|
||||
@@ -894,7 +1036,10 @@ function ParameterFields({
|
||||
</Button>
|
||||
</form>
|
||||
</Panel>
|
||||
<Panel title="Perfis e permissões da empresa">
|
||||
<Panel
|
||||
id="company-profiles"
|
||||
title="Perfis e permissões da empresa"
|
||||
>
|
||||
<div className="mb-4 flex flex-wrap gap-3">
|
||||
{profiles.map((p) => (
|
||||
<Button
|
||||
@@ -934,7 +1079,10 @@ function ParameterFields({
|
||||
/>
|
||||
)}
|
||||
</Panel>
|
||||
<Panel title="Utilizadores e atribuições">
|
||||
<Panel
|
||||
id="company-users"
|
||||
title="Utilizadores e atribuições"
|
||||
>
|
||||
<div className="space-y-3">
|
||||
{users.map((person) => (
|
||||
<Assignment
|
||||
@@ -1073,7 +1221,10 @@ function ParameterFields({
|
||||
</form>
|
||||
</details>
|
||||
</Panel>
|
||||
<Panel title="Organização e centros de custo">
|
||||
<Panel
|
||||
id="company-cost-centres"
|
||||
title="Organização e centros de custo"
|
||||
>
|
||||
<div className="grid gap-5 sm:grid-cols-2">
|
||||
<form
|
||||
ref={departmentRef}
|
||||
@@ -1194,7 +1345,10 @@ function ParameterFields({
|
||||
</form>
|
||||
</div>
|
||||
</Panel>
|
||||
<Panel title="Manutenção TEMPO">
|
||||
<Panel
|
||||
id="company-maintenance"
|
||||
title="Manutenção TEMPO"
|
||||
>
|
||||
<p className="text-sm">
|
||||
Atribua a uma conta nominativa um perfil sem
|
||||
administração, assinale manutenção e defina a
|
||||
|
||||
@@ -17,6 +17,7 @@ import type { ConflictDeclaration } from '@/types/conflict';
|
||||
import { date } from '@/types/procurement';
|
||||
|
||||
type Props = {
|
||||
releasedRoots?: number[];
|
||||
declarations: {
|
||||
data: ConflictDeclaration[];
|
||||
prev_page_url: string | null;
|
||||
@@ -32,6 +33,7 @@ export default function Conflicts(props: Props) {
|
||||
}
|
||||
function DeclarationFields({
|
||||
declarations,
|
||||
releasedRoots = [],
|
||||
suppliers,
|
||||
requisitions,
|
||||
identity,
|
||||
@@ -55,14 +57,14 @@ function DeclarationFields({
|
||||
<PageTitle
|
||||
eyebrow="Integridade nas compras · RF-AF-01"
|
||||
title="Conflitos de interesses"
|
||||
description="Registe a sua situação pessoal perante um fornecedor ou processo. Administração e Finanças podem consultar o registo da empresa; os restantes perfis consultam apenas as suas declarações."
|
||||
description="Registe a sua situação pessoal perante um fornecedor ou processo e consulte as declarações abrangidas pelo seu acesso."
|
||||
/>
|
||||
<div className="rounded-xl border border-amber-200 bg-amber-50 p-5 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-100">
|
||||
Um conflito registado mantém o impedimento, mesmo que exista
|
||||
uma declaração posterior de ausência. Não há caducidade
|
||||
automática nem retirada de conflitos nesta etapa: essas
|
||||
condições dependem da política da empresa. A data de
|
||||
conhecimento descreve o facto e não adia o bloqueio.
|
||||
Uma declaração de ausência não anula conflitos anteriores. O
|
||||
levantamento de um impedimento exige autorização expressa da
|
||||
direcção; a declaração e as suas correcções permanecem no
|
||||
histórico. Não há caducidade automática. A data de
|
||||
conhecimento não adia o bloqueio.
|
||||
</div>
|
||||
<Panel
|
||||
title="Nova declaração pessoal"
|
||||
@@ -282,6 +284,15 @@ function DeclarationFields({
|
||||
{d.has_conflict
|
||||
? 'Conflito registado'
|
||||
: 'Ausência declarada'}
|
||||
{d.has_conflict && (
|
||||
<p className="mt-1 text-xs">
|
||||
{releasedRoots.includes(
|
||||
d.root_id ?? d.id,
|
||||
)
|
||||
? 'Impedimento levantado pela direcção'
|
||||
: 'Impedimento activo'}
|
||||
</p>
|
||||
)}
|
||||
{d.successor && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Com correcção posterior
|
||||
|
||||
@@ -38,24 +38,28 @@ export default function Dashboard({
|
||||
value: stats.total,
|
||||
icon: ClipboardList,
|
||||
detail: 'Total de pedidos visíveis',
|
||||
href: '/requisicoes',
|
||||
},
|
||||
{
|
||||
label: 'Em aprovação',
|
||||
value: stats.pending,
|
||||
icon: Clock3,
|
||||
detail: `${stats.awaitingMe} aguardam a sua decisão`,
|
||||
detail: 'Pedidos visíveis em aprovação',
|
||||
href: '/requisicoes?status=pending',
|
||||
},
|
||||
{
|
||||
label: 'Aprovadas',
|
||||
value: stats.approved,
|
||||
icon: CheckCheck,
|
||||
detail: 'Todas as etapas concluídas',
|
||||
href: '/requisicoes?status=approved',
|
||||
},
|
||||
{
|
||||
label: 'Valor aprovado',
|
||||
value: money(Number(stats.approvedMinor)),
|
||||
icon: Wallet,
|
||||
detail: 'Estimativa em MZN, com IVA',
|
||||
href: '/requisicoes?status=approved',
|
||||
},
|
||||
];
|
||||
return (
|
||||
@@ -105,9 +109,10 @@ export default function Dashboard({
|
||||
<>
|
||||
<div className="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
||||
{cards.map((card) => (
|
||||
<div
|
||||
<Link
|
||||
key={card.label}
|
||||
className="rounded-xl border bg-card p-5 shadow-xs"
|
||||
href={card.href}
|
||||
className="rounded-xl border bg-card p-5 shadow-xs transition-colors hover:border-teal-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-700"
|
||||
>
|
||||
<div className="flex items-center justify-between text-sm text-muted-foreground">
|
||||
<span>{card.label}</span>
|
||||
@@ -119,9 +124,17 @@ export default function Dashboard({
|
||||
<p className="mt-2 text-xs text-muted-foreground">
|
||||
{card.detail}
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
<Link
|
||||
href="/requisicoes?view=approvals"
|
||||
className="inline-flex items-center gap-2 self-start rounded-sm text-sm font-medium text-teal-700 underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-700 dark:text-teal-400"
|
||||
>
|
||||
Requisições que aguardam a sua decisão:{' '}
|
||||
{stats.awaitingMe}
|
||||
<ArrowRight className="size-4" />
|
||||
</Link>
|
||||
{company?.rules_provisional && (
|
||||
<div className="rounded-xl border border-amber-200 bg-amber-50 px-5 py-4 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-100">
|
||||
<strong>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import {
|
||||
FormErrors,
|
||||
PageTitle,
|
||||
@@ -94,22 +94,7 @@ export default function CapitalRegister(props: Props) {
|
||||
reason: '',
|
||||
},
|
||||
);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const edit = (record: Record) =>
|
||||
form.setData({
|
||||
...record.data,
|
||||
@@ -135,6 +120,11 @@ export default function CapitalRegister(props: Props) {
|
||||
<Link className="underline" href="/equipamentos">
|
||||
Consultar equipamentos e peças
|
||||
</Link>
|
||||
{props.canManage && (
|
||||
<a className="underline" href="#capital-preparation">
|
||||
Ir para a preparação do cadastro
|
||||
</a>
|
||||
)}
|
||||
<Panel
|
||||
title="Identidades registadas"
|
||||
description="As revisões conservam o código e o histórico. Arquivar impede novas escolhas sem apagar ligações anteriores."
|
||||
@@ -174,16 +164,18 @@ export default function CapitalRegister(props: Props) {
|
||||
<Link
|
||||
className="underline"
|
||||
preserveState
|
||||
href={`${url}?history=${record.record_key}`}
|
||||
href={`${url}?history=${record.record_key}#capital-history`}
|
||||
>
|
||||
Consultar versões e origens
|
||||
</Link>
|
||||
{props.canManage && (
|
||||
<Button
|
||||
variant="outline"
|
||||
<Button asChild variant="outline">
|
||||
<a
|
||||
href="#capital-preparation"
|
||||
onClick={() => edit(record)}
|
||||
>
|
||||
Preparar nova versão
|
||||
</a>
|
||||
</Button>
|
||||
)}
|
||||
</article>
|
||||
@@ -205,7 +197,7 @@ export default function CapitalRegister(props: Props) {
|
||||
</nav>
|
||||
</Panel>
|
||||
{props.history && (
|
||||
<Panel title="Histórico do registo">
|
||||
<Panel id="capital-history" title="Histórico do registo">
|
||||
{props.history.data.map((record) => (
|
||||
<article
|
||||
key={record.id}
|
||||
@@ -373,6 +365,7 @@ export default function CapitalRegister(props: Props) {
|
||||
)}
|
||||
{props.canManage && (
|
||||
<Panel
|
||||
id="capital-preparation"
|
||||
title={
|
||||
form.data.record_key
|
||||
? `Rever cadastro · versão ${form.data.version}`
|
||||
|
||||
@@ -260,7 +260,8 @@ export default function Home() {
|
||||
TEMPO
|
||||
</span>
|
||||
<span>
|
||||
O orçamento ainda não é validado. Os documentos não
|
||||
Consulte no processo as decisões e o controlo
|
||||
orçamental. Documentos de desenvolvimento não
|
||||
autorizam compras reais.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -291,8 +291,28 @@ export default function Invoices({
|
||||
Todas as facturas / seleccionar outra encomenda
|
||||
</Link>
|
||||
)}
|
||||
<nav
|
||||
aria-label="Áreas da facturação"
|
||||
className="flex flex-wrap gap-4 text-sm font-medium"
|
||||
>
|
||||
<a
|
||||
className="underline underline-offset-4"
|
||||
href="#invoice-documents"
|
||||
>
|
||||
Facturas registadas
|
||||
</a>
|
||||
{canManage && focusInvoiceId === null && (
|
||||
<a
|
||||
className="underline underline-offset-4"
|
||||
href="#invoice-registration"
|
||||
>
|
||||
Registar factura
|
||||
</a>
|
||||
)}
|
||||
</nav>
|
||||
{canManage && focusInvoiceId === null && (
|
||||
<Panel
|
||||
id="invoice-registration"
|
||||
title="Registar factura"
|
||||
description="Reutilize a encomenda e indique os dados novos do documento do fornecedor. Unidade, preço e IVA vêm da encomenda; os totais do documento continuam a exigir coincidência exacta e conferência independente."
|
||||
>
|
||||
@@ -712,6 +732,12 @@ export default function Invoices({
|
||||
{validationError}
|
||||
</p>
|
||||
)}
|
||||
<section
|
||||
id="invoice-documents"
|
||||
tabIndex={-1}
|
||||
aria-label="Facturas registadas"
|
||||
className="min-w-0 scroll-mt-24 space-y-6 lg:scroll-mt-72"
|
||||
>
|
||||
{invoices.data.map((invoice) => (
|
||||
<div key={invoice.id} id={`invoice-${invoice.id}`}>
|
||||
<Panel
|
||||
@@ -747,8 +773,8 @@ export default function Invoices({
|
||||
className="underline"
|
||||
href={`/obrigacoes-fornecedores?invoice=${invoice.id}`}
|
||||
>
|
||||
Consultar ou preparar obrigação desta
|
||||
factura
|
||||
Consultar ou preparar obrigação
|
||||
desta factura
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
@@ -805,9 +831,14 @@ export default function Invoices({
|
||||
</div>
|
||||
))}
|
||||
{invoices.data.length === 0 && (
|
||||
<p>Sem facturas registadas nesta empresa.</p>
|
||||
<p>
|
||||
{focusOrderId !== null
|
||||
? 'Sem facturas disponíveis para esta ordem.'
|
||||
: 'Sem facturas disponíveis nesta consulta.'}
|
||||
</p>
|
||||
)}
|
||||
<InventoryPagination page={invoices} />
|
||||
</section>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import {
|
||||
FormErrors,
|
||||
PageTitle,
|
||||
@@ -83,22 +83,7 @@ export default function ApprovalTimeouts(props: Props) {
|
||||
},
|
||||
);
|
||||
const current = form.data.version === (props.current?.version ?? 0);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const edit = () =>
|
||||
form.setData({
|
||||
operation_key: '',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import {
|
||||
PageTitle,
|
||||
Panel,
|
||||
@@ -36,22 +36,7 @@ export default function UrgentReviewPolicy(props: {
|
||||
reason: '',
|
||||
},
|
||||
);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const current = form.data.version === (props.current?.version ?? 0);
|
||||
return (
|
||||
<main className="mx-auto flex w-full max-w-6xl flex-col gap-6 p-5 lg:p-8">
|
||||
|
||||
@@ -170,6 +170,7 @@ export default function Reports(props: Props) {
|
||||
description="O período refere-se à criação dos processos. A exportação usa os filtros aplicados."
|
||||
>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="grid gap-4 md:grid-cols-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import {
|
||||
OrderDocumentLinks,
|
||||
type RelatedProcess,
|
||||
} from '@/components/order-document-links';
|
||||
import { AgreementOrderLimitSummary } from '@/components/agreement-order-bindings';
|
||||
import { Printer } from 'lucide-react';
|
||||
import { ComparisonPolicySummary } from '@/components/comparison-policy-summary';
|
||||
@@ -40,6 +44,8 @@ export default function OrderShow({
|
||||
snapshotComplete = true,
|
||||
orderPartsSources = [],
|
||||
canAmendOrderParts = false,
|
||||
financialDocumentsHref = null,
|
||||
relatedProcesses = [],
|
||||
}: {
|
||||
order: PurchaseOrder;
|
||||
history: History[];
|
||||
@@ -47,6 +53,8 @@ export default function OrderShow({
|
||||
snapshotComplete?: boolean;
|
||||
orderPartsSources?: OrderPartFrame[];
|
||||
canAmendOrderParts?: boolean;
|
||||
financialDocumentsHref?: string | null;
|
||||
relatedProcesses?: RelatedProcess[];
|
||||
}) {
|
||||
const snapshot = order.snapshot;
|
||||
if (!snapshotComplete) {
|
||||
@@ -59,6 +67,16 @@ export default function OrderShow({
|
||||
title={order.number}
|
||||
description="Consulta dos dados preservados na emissão."
|
||||
/>
|
||||
{orderCancellation && (
|
||||
<OrderCancellationRequest
|
||||
orderId={order.id}
|
||||
state={orderCancellation}
|
||||
/>
|
||||
)}
|
||||
<OrderDocumentLinks
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
relatedProcesses={relatedProcesses}
|
||||
/>
|
||||
<Panel title="Documento original incompleto">
|
||||
<p>
|
||||
Este documento não conserva todos os elementos da
|
||||
@@ -127,14 +145,6 @@ export default function OrderShow({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{(!orderCancellation || orderCancellation.state === 'issued') && (
|
||||
<Link
|
||||
href={`/ordens/${order.id}/recepcoes`}
|
||||
className="mx-auto mt-4 w-full max-w-6xl px-5 text-sm font-medium text-teal-700 dark:text-teal-400"
|
||||
>
|
||||
Recepções, qualidade e quantidades pendentes
|
||||
</Link>
|
||||
)}
|
||||
<div className="mx-auto flex w-full max-w-6xl flex-col gap-7 p-5 lg:p-8">
|
||||
<PageTitle
|
||||
eyebrow={snapshot.company.name}
|
||||
@@ -159,12 +169,22 @@ export default function OrderShow({
|
||||
reais.
|
||||
</strong>{' '}
|
||||
{snapshot.budget_checked === true
|
||||
? 'Controlo orçamental confirmado para as parcelas emitidas. '
|
||||
: 'Orçamento não verificado. '}{' '}
|
||||
? 'Controlo orçamental registado na emissão. '
|
||||
: 'Este documento não preserva confirmação do controlo orçamental. '}{' '}
|
||||
Os dados apresentados foram congelados na emissão.
|
||||
{snapshot.approval_rules.rules_provisional &&
|
||||
' Regras de aprovação provisórias.'}
|
||||
</div>
|
||||
<OrderDocumentLinks
|
||||
receiptsHref={
|
||||
!orderCancellation ||
|
||||
orderCancellation.state === 'issued'
|
||||
? `/ordens/${order.id}/recepcoes`
|
||||
: null
|
||||
}
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
relatedProcesses={relatedProcesses}
|
||||
/>
|
||||
<OrderPartsSummary sources={orderPartsSources} />
|
||||
{canAmendOrderParts && (
|
||||
<Link
|
||||
|
||||
@@ -149,12 +149,21 @@ function ComparisonContent({
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
<div className="space-y-3 print:hidden">
|
||||
<Link
|
||||
className="text-sm font-medium text-teal-700 dark:text-teal-400"
|
||||
href={`/requisicoes/${requisition.id}/adjudicacao`}
|
||||
>
|
||||
Adjudicação, aprovações do valor final e ordem de compra
|
||||
</Link>
|
||||
<details className="rounded-lg border p-4">
|
||||
<summary className="cursor-pointer text-sm font-medium">
|
||||
Outras etapas e documentos do processo
|
||||
</summary>
|
||||
<nav
|
||||
aria-label="Etapas e documentos relacionados"
|
||||
className="mt-3 grid gap-3 sm:grid-cols-2"
|
||||
>
|
||||
<Link
|
||||
className="text-sm font-medium underline"
|
||||
href={`/requisicoes/${requisition.id}/abertura`}
|
||||
@@ -191,11 +200,16 @@ function ComparisonContent({
|
||||
>
|
||||
Consultar requisição e aprovações
|
||||
</Link>
|
||||
<Link className="text-sm text-teal-700" href="/conflitos">
|
||||
Registar ou consultar a minha declaração de conflito
|
||||
<Link
|
||||
className="text-sm text-teal-700"
|
||||
href="/conflitos"
|
||||
>
|
||||
Registar ou consultar a minha declaração de
|
||||
conflito
|
||||
</Link>
|
||||
{urgentQuotationReady &&
|
||||
comparisonPolicy.urgent_minimum_proposals !== undefined && (
|
||||
comparisonPolicy.urgent_minimum_proposals !==
|
||||
undefined && (
|
||||
<Link
|
||||
className="text-sm text-teal-700"
|
||||
href={`/requisicoes/${requisition.id}/urgencia-stock`}
|
||||
@@ -203,6 +217,9 @@ function ComparisonContent({
|
||||
Stock mínimo das cotações urgentes
|
||||
</Link>
|
||||
)}
|
||||
</nav>
|
||||
</details>
|
||||
</div>
|
||||
<div
|
||||
className={`rounded-xl border p-5 text-sm ${ready ? 'border-teal-200 bg-teal-50 text-teal-900' : 'border-amber-200 bg-amber-50 text-amber-900'}`}
|
||||
>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Head, Link, useForm, usePage } from '@inertiajs/react';
|
||||
import { OrderDocumentLinks } from '@/components/order-document-links';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import {
|
||||
receiptPreparationKey,
|
||||
@@ -48,6 +49,7 @@ type Props = {
|
||||
warehouses: Warehouse[];
|
||||
stockItems: StockItem[];
|
||||
canConfirm: boolean;
|
||||
financialDocumentsHref?: string | null;
|
||||
conversionQaEnabled?: boolean;
|
||||
lotScopes: {
|
||||
stock_item_id: number;
|
||||
@@ -63,6 +65,7 @@ function ReceiveOrderContent({
|
||||
warehouses,
|
||||
stockItems,
|
||||
canConfirm,
|
||||
financialDocumentsHref = null,
|
||||
conversionQaEnabled = false,
|
||||
lotScopes,
|
||||
}: Props) {
|
||||
@@ -120,6 +123,9 @@ function ReceiveOrderContent({
|
||||
description={supplier_name}
|
||||
/>
|
||||
<InventoryNotice />
|
||||
<OrderDocumentLinks
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
/>
|
||||
<Panel title="Quantidades da ordem">
|
||||
<ReceiptProgressTable progress={progress} />
|
||||
<p className="mt-4 text-xs text-muted-foreground">
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Head, Link } from '@inertiajs/react';
|
||||
import { convertedQuantity } from '@/components/receipt-conversion';
|
||||
import { InventoryNotice } from '@/components/inventory';
|
||||
import { PageTitle, Panel } from '@/components/procurement';
|
||||
import { OrderDocumentLinks } from '@/components/order-document-links';
|
||||
import { date } from '@/types/procurement';
|
||||
import { quantity, qualityStates, receiptStates } from '@/types/inventory';
|
||||
import type { Receipt, StockMovement } from '@/types/inventory';
|
||||
@@ -17,6 +18,7 @@ export default function ReceiptShow({
|
||||
canAddDocuments = false,
|
||||
documents = [],
|
||||
purchaseProcessHref = null,
|
||||
financialDocumentsHref = null,
|
||||
}: {
|
||||
receipt: Receipt;
|
||||
movements: StockMovement[];
|
||||
@@ -25,6 +27,7 @@ export default function ReceiptShow({
|
||||
canAddDocuments?: boolean;
|
||||
documents?: ReceiptDocument[];
|
||||
purchaseProcessHref?: string | null;
|
||||
financialDocumentsHref?: string | null;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
@@ -36,6 +39,9 @@ export default function ReceiptShow({
|
||||
description={`${receipt.snapshot.supplier.name} · ${receiptStates[receipt.status]}`}
|
||||
/>
|
||||
<InventoryNotice />
|
||||
<OrderDocumentLinks
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
/>
|
||||
<a
|
||||
href={`/recepcoes/${receipt.id}/imprimir`}
|
||||
className="text-sm underline"
|
||||
|
||||
@@ -124,49 +124,140 @@ export default function ProcurementReports({
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
<nav
|
||||
aria-label="Secções dos relatórios"
|
||||
className="flex flex-wrap gap-2 print:hidden"
|
||||
>
|
||||
{[
|
||||
{
|
||||
id: 'report-filters',
|
||||
label: 'Filtros e requisições',
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: 'report-operational',
|
||||
label: 'Acompanhamento',
|
||||
available: !!insights,
|
||||
},
|
||||
{
|
||||
id: 'report-payables',
|
||||
label: 'Obrigações',
|
||||
available: !!payableInsights,
|
||||
},
|
||||
{
|
||||
id: 'report-deliveries',
|
||||
label: 'Entregas',
|
||||
available: !!deliveryInsights,
|
||||
},
|
||||
{
|
||||
id: 'report-payments',
|
||||
label: 'Despesa confirmada',
|
||||
available: !!paymentInsights,
|
||||
},
|
||||
{
|
||||
id: 'report-contracts',
|
||||
label: 'Contratos',
|
||||
available: !!contractInsights,
|
||||
},
|
||||
]
|
||||
.filter((section) => section.available)
|
||||
.map((section) => (
|
||||
<a
|
||||
key={section.id}
|
||||
href={`#${section.id}`}
|
||||
className="rounded-lg border bg-card px-3 py-2 text-sm font-medium hover:border-teal-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-700"
|
||||
>
|
||||
{section.label}
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
{insights && (
|
||||
<section
|
||||
id="report-operational"
|
||||
aria-label="Acompanhamento"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<ProcurementOperationalInsights
|
||||
data={insights}
|
||||
neededPastHref={`/relatorios?${attentionParams}`}
|
||||
withoutQuotesHref={`/relatorios?${quoteParams}`}
|
||||
withoutOrderHref={`/relatorios?${orderParams}`}
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
{payableInsights && (
|
||||
<section
|
||||
id="report-payables"
|
||||
aria-label="Obrigações"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<ProcurementPayableInsights
|
||||
data={payableInsights}
|
||||
exportHref={`/relatorios/obrigacoes.csv?${params}`}
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
{deliveryInsights && (
|
||||
<section
|
||||
id="report-deliveries"
|
||||
aria-label="Entregas"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<ProcurementDeliveryInsights
|
||||
data={deliveryInsights}
|
||||
pageHref={`/relatorios?${params}`}
|
||||
exportHref={`/relatorios/entregas.csv?${params}`}
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
{paymentInsights && (
|
||||
<section
|
||||
id="report-payments"
|
||||
aria-label="Despesa confirmada"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<ProcurementPaymentInsights
|
||||
data={paymentInsights}
|
||||
exportHref={`/relatorios/despesa.csv?${params}`}
|
||||
pageHref={`/relatorios?${params}`}
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
{contractInsights && (
|
||||
<section
|
||||
id="report-contracts"
|
||||
aria-label="Contratos"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<ProcurementContractInsights
|
||||
data={contractInsights}
|
||||
exportHref={`/relatorios/contratos.csv?${params}`}
|
||||
/>
|
||||
</section>
|
||||
)}
|
||||
<section
|
||||
id="report-filters"
|
||||
aria-label="Filtros e requisições"
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 lg:scroll-mt-72"
|
||||
>
|
||||
<Panel
|
||||
title="Filtrar requisições"
|
||||
description="O período refere-se à criação da requisição. Os resultados respeitam o seu acesso à empresa e ao departamento."
|
||||
>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
form.get('/relatorios', { preserveState: true });
|
||||
form.get('/relatorios', {
|
||||
preserveState: true,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<label className="grid gap-1 text-sm">
|
||||
@@ -175,7 +266,10 @@ export default function ProcurementReports({
|
||||
className={controlClass}
|
||||
value={form.data.search}
|
||||
onChange={(event) =>
|
||||
form.setData('search', event.target.value)
|
||||
form.setData(
|
||||
'search',
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
/>
|
||||
</label>
|
||||
@@ -185,7 +279,10 @@ export default function ProcurementReports({
|
||||
className={controlClass}
|
||||
value={form.data.status}
|
||||
onChange={(event) =>
|
||||
form.setData('status', event.target.value)
|
||||
form.setData(
|
||||
'status',
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
>
|
||||
<option value="">Todos</option>
|
||||
@@ -210,7 +307,9 @@ export default function ProcurementReports({
|
||||
)
|
||||
}
|
||||
>
|
||||
<option value="">Todos os autorizados</option>
|
||||
<option value="">
|
||||
Todos os autorizados
|
||||
</option>
|
||||
{departments.map((item) => (
|
||||
<option key={item.id} value={item.id}>
|
||||
{item.name}
|
||||
@@ -266,7 +365,10 @@ export default function ProcurementReports({
|
||||
</select>
|
||||
</label>
|
||||
<ActionBar>
|
||||
<Button type="submit" disabled={form.processing}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={form.processing}
|
||||
>
|
||||
Aplicar filtros
|
||||
</Button>
|
||||
<Link
|
||||
@@ -279,6 +381,7 @@ export default function ProcurementReports({
|
||||
<FormErrors errors={form.errors} />
|
||||
</form>
|
||||
</Panel>
|
||||
</section>
|
||||
<section
|
||||
aria-label="Resumo dos resultados"
|
||||
className="flex flex-wrap gap-3"
|
||||
|
||||
@@ -170,6 +170,7 @@ export default function SupplierImprovementReport({
|
||||
)}
|
||||
<Panel title="Filtros do acompanhamento">
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4 print:hidden"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -76,6 +76,7 @@ export default function Index({ requisitions, filters }: Props) {
|
||||
/>
|
||||
<Panel title="Pedidos de compra">
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mb-6 flex flex-wrap gap-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -128,7 +129,20 @@ export default function Index({ requisitions, filters }: Props) {
|
||||
Filtrar
|
||||
</Button>
|
||||
</form>
|
||||
<RequisitionTable rows={requisitions.data} />
|
||||
<RequisitionTable
|
||||
rows={requisitions.data}
|
||||
emptyDescription={
|
||||
filters.search || filters.status
|
||||
? 'Nenhum pedido corresponde aos filtros neste conjunto. Ajuste a referência ou o estado para voltar a consultar.'
|
||||
: filters.view === 'approvals'
|
||||
? 'Não há requisições com uma etapa disponível para a sua decisão neste momento.'
|
||||
: filters.view === 'decided'
|
||||
? 'Ainda não registou decisões nos pedidos disponíveis para o seu perfil.'
|
||||
: filters.view === 'mine'
|
||||
? 'Ainda não existem pedidos criados por si neste conjunto.'
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<div className="mt-5 flex flex-wrap items-center justify-between gap-3 border-t pt-4 text-sm text-muted-foreground">
|
||||
<p>
|
||||
{requisitions.total} pedidos · Página{' '}
|
||||
|
||||
@@ -35,6 +35,7 @@ type LinkRecord = {
|
||||
snapshot: { source: Order };
|
||||
};
|
||||
type Props = {
|
||||
selectedOrderId?: number | null;
|
||||
policy: { id: number; version: number; data: { mode: string } } | null;
|
||||
canConfigure: boolean;
|
||||
allowedTypes: string[];
|
||||
@@ -77,6 +78,14 @@ function Workspace(props: Props & { identity: string }) {
|
||||
title="Ordens de produção e manutenção"
|
||||
description="Registe a necessidade no local de utilização ou através do procurement, conforme a configuração da empresa. A ordem de origem acompanha a compra."
|
||||
/>
|
||||
{props.selectedOrderId && (
|
||||
<p className="rounded-lg border bg-card p-3 text-sm">
|
||||
A consultar uma ordem específica.{' '}
|
||||
<Link href={base} className="font-medium underline">
|
||||
Ver todas as ordens disponíveis
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
{props.requisition && (
|
||||
<p>
|
||||
<Link
|
||||
@@ -212,7 +221,12 @@ function Workspace(props: Props & { identity: string }) {
|
||||
)}
|
||||
<ul className="space-y-4">
|
||||
{props.orders.data.map((order) => (
|
||||
<li className="rounded border p-4" key={order.id}>
|
||||
<li
|
||||
id={`op-order-${order.id}`}
|
||||
tabIndex={-1}
|
||||
className="scroll-mt-24 rounded border p-4 lg:scroll-mt-72"
|
||||
key={order.id}
|
||||
>
|
||||
<p className="font-semibold">
|
||||
{labels[order.data.type]} ·{' '}
|
||||
{order.data.reference}
|
||||
|
||||
@@ -351,9 +351,9 @@ export default function Show({
|
||||
investimento vigente, com duas aprovações
|
||||
administrativas, e reserva em dotação de
|
||||
investimento. Sem estas condições permanecem
|
||||
bloqueadas. O orçamento ainda não é validado;
|
||||
documentos de desenvolvimento não autorizam
|
||||
compras reais.
|
||||
bloqueadas. A validação técnica não substitui o
|
||||
controlo orçamental. Documentos de
|
||||
desenvolvimento não autorizam compras reais.
|
||||
</p>
|
||||
{technical?.reviews.map((t) => (
|
||||
<p
|
||||
|
||||
@@ -38,6 +38,8 @@ const statuses: Record<string, string> = {
|
||||
partial: 'Entrega parcial',
|
||||
delivered: 'Entregue',
|
||||
closed: 'Encerrada',
|
||||
archived: 'Arquivado',
|
||||
recorded: 'Registada',
|
||||
};
|
||||
export default function ProcurementSearch({
|
||||
term,
|
||||
@@ -45,6 +47,8 @@ export default function ProcurementSearch({
|
||||
invoiceSearchAvailable = false,
|
||||
supplySearchAvailable = false,
|
||||
warehouseRequestSearchAvailable = false,
|
||||
capitalSearchAvailable = false,
|
||||
operationalOrderSearchAvailable = false,
|
||||
savedSearches = null,
|
||||
}: {
|
||||
term: string;
|
||||
@@ -52,9 +56,13 @@ export default function ProcurementSearch({
|
||||
invoiceSearchAvailable?: boolean;
|
||||
supplySearchAvailable?: boolean;
|
||||
warehouseRequestSearchAvailable?: boolean;
|
||||
capitalSearchAvailable?: boolean;
|
||||
operationalOrderSearchAvailable?: boolean;
|
||||
savedSearches?: SavedSearches | null;
|
||||
}) {
|
||||
const form = useForm({ q: term });
|
||||
const populatedGroups = groups.filter((group) => group.records.total > 0);
|
||||
const emptyGroups = groups.filter((group) => group.records.total === 0);
|
||||
return (
|
||||
<>
|
||||
<Head title="Pesquisar processos" />
|
||||
@@ -66,9 +74,10 @@ export default function ProcurementSearch({
|
||||
/>
|
||||
<Panel
|
||||
title="Pesquisa transversal de Compras"
|
||||
description={`Pesquise requisições, ordens, fornecedores, recepções, equipamentos, artigos e armazéns por referência, necessidade, nome, código ou NUIT.${invoiceSearchAvailable ? ' Pode também procurar facturas de fornecedor pelo número, dentro do seu acesso financeiro.' : ''}${supplySearchAvailable ? ' Acordos e contratos disponíveis são pesquisados pela referência ou pelo nome do fornecedor preservado, na sua versão actual.' : ''}${warehouseRequestSearchAvailable ? ' Requisições internas de armazém podem ser encontradas pela referência RA, destino ou nome do requisitante preservado.' : ''} A pesquisa não inclui Pessoas, conteúdo de anexos ou arquivos externos.`}
|
||||
description="Procure uma referência, código, nome ou necessidade nos módulos disponíveis para si."
|
||||
>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="flex flex-wrap items-end gap-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -97,13 +106,35 @@ export default function ProcurementSearch({
|
||||
<Button disabled={form.processing}>Pesquisar</Button>
|
||||
</form>
|
||||
<FormErrors errors={form.errors} />
|
||||
{invoiceSearchAvailable && (
|
||||
<details className="mt-4 rounded-lg border p-3 text-sm">
|
||||
<summary className="cursor-pointer font-medium">
|
||||
Âmbito da pesquisa
|
||||
</summary>
|
||||
<p className="mt-3">{`Pesquise requisições, ordens, fornecedores, recepções, equipamentos, artigos e armazéns por referência, necessidade, nome, código ou NUIT.${invoiceSearchAvailable ? ' Pode também procurar facturas de fornecedor pelo número, dentro do seu acesso financeiro.' : ''}${supplySearchAvailable ? ' Acordos e contratos disponíveis são pesquisados pela referência ou pelo nome do fornecedor preservado, na sua versão actual.' : ''}${warehouseRequestSearchAvailable ? ' Requisições internas de armazém podem ser encontradas pela referência RA, destino ou nome do requisitante preservado.' : ''} A pesquisa não inclui Pessoas, conteúdo de anexos ou arquivos externos.`}</p>
|
||||
{operationalOrderSearchAvailable && (
|
||||
<p className="mt-3 text-sm text-muted-foreground">
|
||||
Os resultados de facturas mostram a referência e o
|
||||
estado. Abra a factura para consultar os valores e
|
||||
documentos autorizados.
|
||||
As ordens de produção e manutenção podem ser
|
||||
procuradas por referência, local ou descrição. O
|
||||
resultado abre a ordem de origem autorizada.
|
||||
</p>
|
||||
)}
|
||||
{capitalSearchAvailable && (
|
||||
<p className="mt-3 text-sm text-muted-foreground">
|
||||
Pode procurar projectos e imobilizado próprios
|
||||
de Compras por código, nome ou referência
|
||||
documental. Os resultados mostram a versão
|
||||
actual e abrem o histórico do cadastro, dentro
|
||||
do seu acesso ao departamento.
|
||||
</p>
|
||||
)}
|
||||
{invoiceSearchAvailable && (
|
||||
<p className="mt-3 text-sm text-muted-foreground">
|
||||
Os resultados de facturas mostram a referência e
|
||||
o estado. Abra a factura para consultar os
|
||||
valores e documentos autorizados.
|
||||
</p>
|
||||
)}
|
||||
</details>
|
||||
</Panel>
|
||||
{savedSearches && (
|
||||
<SavedProcurementSearches
|
||||
@@ -117,13 +148,22 @@ export default function ProcurementSearch({
|
||||
Introduza pelo menos dois caracteres para pesquisar.
|
||||
</p>
|
||||
)}
|
||||
{groups.map((group) => (
|
||||
{groups.length > 0 && populatedGroups.length === 0 && (
|
||||
<p role="status">
|
||||
Não foram encontrados resultados para esta pesquisa no
|
||||
seu âmbito de acesso.
|
||||
</p>
|
||||
)}
|
||||
{populatedGroups.map((group) => (
|
||||
<Panel
|
||||
key={group.key}
|
||||
title={`${group.title} (${group.records.total})`}
|
||||
>
|
||||
{group.records.data.length === 0 ? (
|
||||
<p>Nenhum resultado no seu âmbito de acesso.</p>
|
||||
<p>
|
||||
Não há resultados nesta página. Consulte as
|
||||
páginas disponíveis abaixo.
|
||||
</p>
|
||||
) : (
|
||||
<ul className="divide-y">
|
||||
{group.records.data.map((record) => (
|
||||
@@ -166,6 +206,22 @@ export default function ProcurementSearch({
|
||||
</nav>
|
||||
</Panel>
|
||||
))}
|
||||
{emptyGroups.length > 0 && (
|
||||
<details className="rounded-xl border bg-card p-5">
|
||||
<summary className="cursor-pointer font-medium">
|
||||
Áreas sem resultados ({emptyGroups.length})
|
||||
</summary>
|
||||
<p className="mt-3 text-sm text-muted-foreground">
|
||||
Estas áreas também foram pesquisadas dentro do seu
|
||||
acesso actual.
|
||||
</p>
|
||||
<ul className="mt-3 flex flex-wrap gap-x-6 gap-y-2 text-sm">
|
||||
{emptyGroups.map((group) => (
|
||||
<li key={group.key}>{group.title}</li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ type Props = {
|
||||
warehouse: { name: string } | null;
|
||||
checkedAt: string;
|
||||
planningVisible: boolean;
|
||||
reservationsAvailable?: boolean;
|
||||
rows: null | {
|
||||
data: Row[];
|
||||
total: number;
|
||||
@@ -56,6 +57,7 @@ export default function Availability(props: Props) {
|
||||
/>
|
||||
<Panel title="Escolher armazém">
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="grid gap-4 md:grid-cols-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -103,10 +105,21 @@ export default function Availability(props: Props) {
|
||||
>
|
||||
<p className="mb-4 text-sm">
|
||||
As necessidades planeadas são apresentadas
|
||||
separadamente. O compromisso físico e a reserva
|
||||
autorizada de requisições ao armazém ainda não estão
|
||||
implementados; não são considerados zero nem deduzidos
|
||||
como se já existissem.
|
||||
separadamente.
|
||||
{props.reservationsAvailable ? (
|
||||
<>
|
||||
{' '}
|
||||
O saldo livre corresponde ao material utilizável
|
||||
menos as reservas físicas registadas.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{' '}
|
||||
As reservas físicas não estão disponíveis nesta
|
||||
consulta; o compromisso e o saldo livre
|
||||
permanecem por determinar.
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
{!props.rows ? (
|
||||
<p>Seleccione o armazém para consultar.</p>
|
||||
@@ -188,6 +201,9 @@ export default function Availability(props: Props) {
|
||||
null &&
|
||||
row.free_milli < 0
|
||||
? 'Reserva com défice de material utilizável — rever qualidade, validade e atendimento'
|
||||
: row.free_milli ===
|
||||
null
|
||||
? 'Saldo livre por determinar'
|
||||
: row.usable_milli ===
|
||||
0
|
||||
? 'Sem material utilizável — necessidade de compra'
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { useProcurementPreparationIdentity } from '@/hooks/use-procurement-preparation-identity';
|
||||
import { hasPreparationChanges } from '@/lib/requisition-history';
|
||||
import { Printer } from 'lucide-react';
|
||||
import SupplierImprovements from '@/components/supplier-improvements';
|
||||
import type { ImprovementData } from '@/components/supplier-improvements';
|
||||
@@ -33,6 +36,7 @@ type Evaluation = {
|
||||
payload: EvaluationPayload;
|
||||
review_reason: string | null;
|
||||
reviewed_at: string | null;
|
||||
reviewed_by?: number | null;
|
||||
};
|
||||
type History = {
|
||||
id: number;
|
||||
@@ -83,11 +87,27 @@ export default function SupplierEvaluation({
|
||||
improvements: ImprovementData;
|
||||
responses: ResponseData;
|
||||
}) {
|
||||
const form = useForm({ version: e.version, payload: e.payload });
|
||||
const command = useForm({ version: e.version, reason: '' });
|
||||
const preparation = useProcurementPreparationIdentity(
|
||||
`supplier-evaluation:${e.id}:${e.version}`,
|
||||
);
|
||||
const form = useForm(`${preparation}:evidence`, {
|
||||
version: e.version,
|
||||
payload: e.payload,
|
||||
});
|
||||
const command = useForm(`${preparation}:decision`, {
|
||||
version: e.version,
|
||||
reason: '',
|
||||
});
|
||||
const base = `/fornecedores/avaliacoes/${e.id}`;
|
||||
const dirty =
|
||||
JSON.stringify(form.data.payload) !== JSON.stringify(e.payload);
|
||||
const dirty = hasPreparationChanges(
|
||||
{ payload: e.payload },
|
||||
{ payload: form.data.payload },
|
||||
);
|
||||
const evidenceRef = usePreparationDirty(dirty, canEdit);
|
||||
const decisionRef = usePreparationDirty(
|
||||
command.data.reason !== '',
|
||||
canReview,
|
||||
);
|
||||
const waiting = e.payload.criteria.filter((row) =>
|
||||
['pending', 'insufficient'].includes(row.result),
|
||||
).length;
|
||||
@@ -139,6 +159,75 @@ export default function SupplierEvaluation({
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
<details className="rounded-xl border bg-card p-4 print:hidden">
|
||||
<summary className="cursor-pointer font-medium">
|
||||
Ir para uma área da avaliação
|
||||
</summary>
|
||||
<nav
|
||||
aria-label="Áreas da avaliação do fornecedor"
|
||||
className="mt-4"
|
||||
>
|
||||
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{[
|
||||
[
|
||||
'evaluation-evidence',
|
||||
canEdit
|
||||
? 'Preparar evidências'
|
||||
: 'Âmbito e evidências',
|
||||
],
|
||||
...(e.review_reason
|
||||
? [
|
||||
[
|
||||
'evaluation-last-review',
|
||||
'Última decisão documentada',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(canReview
|
||||
? [
|
||||
[
|
||||
'evaluation-review',
|
||||
'Conferência independente',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(canRevise
|
||||
? [
|
||||
[
|
||||
'evaluation-revision',
|
||||
'Preparar nova revisão',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
...(!reportOnly
|
||||
? [
|
||||
[
|
||||
'evaluation-history',
|
||||
'Histórico de alterações e decisões',
|
||||
],
|
||||
]
|
||||
: []),
|
||||
[
|
||||
'evaluation-improvements',
|
||||
'Medidas de melhoria',
|
||||
],
|
||||
[
|
||||
'evaluation-responses',
|
||||
'Contraditório do fornecedor',
|
||||
],
|
||||
].map(([id, label]) => (
|
||||
<li key={id}>
|
||||
<a
|
||||
href={`#${id}`}
|
||||
className="font-medium underline underline-offset-4"
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
</details>
|
||||
{notice && (
|
||||
<p
|
||||
role="status"
|
||||
@@ -181,8 +270,13 @@ export default function SupplierEvaluation({
|
||||
só a qualificação, suspensão ou elegibilidade do fornecedor.
|
||||
</p>
|
||||
{canEdit ? (
|
||||
<Panel title="Preparar e conservar evidências">
|
||||
<Panel
|
||||
id="evaluation-evidence"
|
||||
title="Preparar e conservar evidências"
|
||||
>
|
||||
<form
|
||||
ref={evidenceRef}
|
||||
data-preparation-dirty={dirty ? 'true' : undefined}
|
||||
className="space-y-5"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
@@ -241,7 +335,10 @@ export default function SupplierEvaluation({
|
||||
</Panel>
|
||||
) : (
|
||||
<>
|
||||
<Panel title="Âmbito e evidências">
|
||||
<Panel
|
||||
id="evaluation-evidence"
|
||||
title="Âmbito e evidências"
|
||||
>
|
||||
<div className="space-y-4 text-sm">
|
||||
<p>
|
||||
Componente:{' '}
|
||||
@@ -321,18 +418,41 @@ export default function SupplierEvaluation({
|
||||
</>
|
||||
)}
|
||||
{e.review_reason && (
|
||||
<Panel title="Última decisão documentada">
|
||||
<div className="print:break-inside-avoid">
|
||||
<Panel
|
||||
id="evaluation-last-review"
|
||||
title="Última decisão documentada"
|
||||
>
|
||||
{e.reviewed_by != null && (
|
||||
<p className="mb-2 text-sm">
|
||||
Revisor:{' '}
|
||||
{people[e.reviewed_by] ??
|
||||
`#${e.reviewed_by}`}
|
||||
</p>
|
||||
)}
|
||||
<p className="text-sm whitespace-pre-wrap">
|
||||
{e.review_reason}
|
||||
</p>
|
||||
<p className="mt-2 text-xs text-muted-foreground">
|
||||
{e.reviewed_at}
|
||||
{e.reviewed_at
|
||||
? new Date(e.reviewed_at).toLocaleString(
|
||||
'pt-MZ',
|
||||
)
|
||||
: 'Data não indicada no original'}
|
||||
</p>
|
||||
</Panel>
|
||||
</div>
|
||||
)}
|
||||
{canReview && (
|
||||
<Panel title="Conferência independente">
|
||||
<Panel
|
||||
id="evaluation-review"
|
||||
title="Conferência independente"
|
||||
>
|
||||
<form
|
||||
ref={decisionRef}
|
||||
data-preparation-dirty={
|
||||
command.data.reason !== '' ? 'true' : undefined
|
||||
}
|
||||
className="space-y-4"
|
||||
onSubmit={(event) => event.preventDefault()}
|
||||
>
|
||||
@@ -402,7 +522,10 @@ export default function SupplierEvaluation({
|
||||
</p>
|
||||
)}
|
||||
{canRevise && (
|
||||
<Panel title="Rectificar sem apagar a avaliação aprovada">
|
||||
<Panel
|
||||
id="evaluation-revision"
|
||||
title="Rectificar sem apagar a avaliação aprovada"
|
||||
>
|
||||
<p className="mb-3 text-sm">
|
||||
A rectificação cria outro rascunho, com número de
|
||||
revisão próprio. A versão aprovada anterior mantém o
|
||||
@@ -426,7 +549,10 @@ export default function SupplierEvaluation({
|
||||
</Panel>
|
||||
)}
|
||||
{!reportOnly && (
|
||||
<Panel title="Histórico de alterações e decisões">
|
||||
<Panel
|
||||
id="evaluation-history"
|
||||
title="Histórico de alterações e decisões"
|
||||
>
|
||||
<p className="mb-3 text-sm">
|
||||
{history.total} registos preservados. Cada alteração
|
||||
conserva a sua fotografia; versões aprovadas não são
|
||||
|
||||
@@ -208,6 +208,7 @@ export default function Suppliers({
|
||||
</div>
|
||||
)}
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mb-5 flex gap-3"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -107,6 +107,7 @@ export default function AgreementFollowup({
|
||||
}
|
||||
>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="grid gap-4 md:grid-cols-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { Head, Link, router, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import {
|
||||
FormErrors,
|
||||
PageTitle,
|
||||
@@ -108,22 +108,7 @@ export default function ImportBankSupport(props: Props) {
|
||||
reason: '',
|
||||
},
|
||||
);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const edit = (record: BankRecord) => {
|
||||
const label = (id: number | null) =>
|
||||
record.snapshot.documents.find((doc) => doc.id === id)?.reference ??
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { Head, Link, useForm, useRemember } from '@inertiajs/react';
|
||||
import { useEffect, useRef, type RefObject } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
ActionBar,
|
||||
@@ -226,24 +226,6 @@ type DraftComponent = {
|
||||
values: string[];
|
||||
};
|
||||
|
||||
function useGuard(ref: RefObject<HTMLFormElement | null>, dirty: boolean) {
|
||||
useEffect(() => {
|
||||
const element = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: element, dirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: element, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [ref, dirty]);
|
||||
}
|
||||
|
||||
function Pagination({
|
||||
page,
|
||||
}: {
|
||||
@@ -295,8 +277,7 @@ function DocumentForm({
|
||||
reason: '',
|
||||
file: null as File | null,
|
||||
}).dontRemember('file');
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useGuard(ref, form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
return (
|
||||
<Panel title="Registar documento adicional">
|
||||
<p className="mb-4">
|
||||
@@ -548,8 +529,7 @@ function CostPreparation(props: Props & { url: string; historyKey: string }) {
|
||||
})) ?? ([] as DraftComponent[]),
|
||||
reason: '',
|
||||
});
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useGuard(ref, form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const selection = () => ({
|
||||
budget_id: form.data.budget_id,
|
||||
item_references: form.data.components
|
||||
@@ -1048,8 +1028,7 @@ function FinancialStage({
|
||||
reason: '',
|
||||
sources: [] as string[],
|
||||
});
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useGuard(ref, form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
if (!financialReady || !latest) return null;
|
||||
const current = latest.state === 'approved';
|
||||
const changed =
|
||||
@@ -1322,8 +1301,7 @@ export default function ImportCosts(props: Props) {
|
||||
operation_key: crypto.randomUUID(),
|
||||
reason: '',
|
||||
});
|
||||
const decisionRef = useRef<HTMLFormElement>(null);
|
||||
useGuard(decisionRef, decision.isDirty);
|
||||
const decisionRef = usePreparationDirty(decision.isDirty);
|
||||
return (
|
||||
<>
|
||||
<Head title="Custo de aterragem" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { useRef } from 'react';
|
||||
import { FormErrors, PageTitle, Panel } from '@/components/procurement';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -69,23 +70,8 @@ export default function Dossier({
|
||||
file: null as File | null,
|
||||
},
|
||||
);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const fileRef = useRef<HTMLInputElement>(null);
|
||||
useEffect(() => {
|
||||
const current = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: current, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: current, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const correction = (document: Document) => {
|
||||
form.setData({
|
||||
operation_key: crypto.randomUUID(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { Head, Link, router, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import {
|
||||
FormErrors,
|
||||
PageTitle,
|
||||
@@ -139,22 +139,7 @@ export default function ImportEstimate(props: Props) {
|
||||
})),
|
||||
},
|
||||
);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
return (
|
||||
<>
|
||||
<Head title="Estimativa de importação" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import {
|
||||
FormErrors,
|
||||
PageTitle,
|
||||
@@ -19,6 +19,18 @@ import {
|
||||
specificRateMinor,
|
||||
} from '@/lib/import-legal-specific-rate';
|
||||
import { date, money } from '@/types/procurement';
|
||||
import type { InvalidEvent } from 'react';
|
||||
|
||||
export function revealInvalidLegalField(event: InvalidEvent<HTMLFormElement>) {
|
||||
const field = event.currentTarget.querySelector<HTMLElement>(
|
||||
'input:invalid, select:invalid, textarea:invalid',
|
||||
);
|
||||
if (field !== event.target) return;
|
||||
requestAnimationFrame(() => {
|
||||
field.focus({ preventScroll: true });
|
||||
field.scrollIntoView({ block: 'center', behavior: 'instant' });
|
||||
});
|
||||
}
|
||||
|
||||
type LegalData = {
|
||||
title: string;
|
||||
@@ -52,15 +64,20 @@ type Page<T> = {
|
||||
type Props = {
|
||||
referenceDraftWarnings?: { source_id: number; message: string }[];
|
||||
referenceDrafts?: {
|
||||
label?: string;
|
||||
match_code?: string;
|
||||
suggested_code?: string;
|
||||
source_id: number;
|
||||
code: string;
|
||||
description: string;
|
||||
rate_percent: string;
|
||||
rate_label?: string;
|
||||
title: string;
|
||||
official_reference: string;
|
||||
official_url: string | null;
|
||||
citation: string;
|
||||
valid_from: string;
|
||||
valid_until?: string | null;
|
||||
obligations: string;
|
||||
charges: LegalCharge[];
|
||||
}[];
|
||||
@@ -137,23 +154,6 @@ const states: Record<string, string> = {
|
||||
published: 'Publicada pela área aduaneira',
|
||||
withdrawn: 'Retirada de novas sugestões',
|
||||
};
|
||||
function useDirtyForm(dirty: boolean) {
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const form = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', { detail: { form, dirty } }),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [dirty]);
|
||||
return ref;
|
||||
}
|
||||
function Pages({ page }: { page: Page<unknown> }) {
|
||||
return (
|
||||
<nav className="flex flex-wrap gap-4" aria-label="Páginas">
|
||||
@@ -181,7 +181,7 @@ function Proposal({
|
||||
`legal-proposal:${props.tenantId}:${props.actorId}:${props.requisition.id}:${rule.id}:${JSON.stringify(props.filters)}`,
|
||||
{ operation_key: '', requisition_item_id: '', reason: '', version: 0 },
|
||||
);
|
||||
const ref = useDirtyForm(form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
return (
|
||||
<form
|
||||
ref={ref}
|
||||
@@ -280,7 +280,7 @@ function ChargeEstimate({
|
||||
),
|
||||
},
|
||||
);
|
||||
const ref = useDirtyForm(form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const previous = props.estimates?.find(
|
||||
(estimate) =>
|
||||
String(estimate.data.requisition_item_id) ===
|
||||
@@ -511,7 +511,7 @@ function SourceForm({ url, scope }: { url: string; scope: string }) {
|
||||
reason: '',
|
||||
file: null as File | null,
|
||||
});
|
||||
const ref = useDirtyForm(form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
return (
|
||||
<form
|
||||
ref={ref}
|
||||
@@ -622,23 +622,8 @@ export default function ImportLegal(props: Props) {
|
||||
reason: '',
|
||||
},
|
||||
);
|
||||
const actionRef = useDirtyForm(action.isDirty);
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: form.isDirty },
|
||||
}),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form: node, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [form.isDirty]);
|
||||
const actionRef = usePreparationDirty(action.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const edit = (rule: LegalRule) => {
|
||||
form.setData({
|
||||
...form.data,
|
||||
@@ -687,11 +672,47 @@ export default function ImportLegal(props: Props) {
|
||||
>
|
||||
Voltar à classificação pautal
|
||||
</Link>
|
||||
<details className="rounded-xl border bg-card p-4">
|
||||
<summary className="cursor-pointer font-medium">
|
||||
Ir para uma área da base legal
|
||||
</summary>
|
||||
<nav
|
||||
aria-label="Áreas da base legal de importação"
|
||||
className="mt-4"
|
||||
>
|
||||
<ul className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{[
|
||||
['legal-suggestions', 'Consultar sugestões'],
|
||||
['legal-rules', 'Regras preparadas e publicadas'],
|
||||
...(props.canManage
|
||||
? [['legal-rule-editor', 'Preparar regra']]
|
||||
: []),
|
||||
...(props.canManage && action.data.record_key
|
||||
? [['legal-decision', 'Decisão preparada']]
|
||||
: []),
|
||||
['legal-sources', 'Diplomas disponíveis'],
|
||||
['legal-estimates', 'Estimativas documentadas'],
|
||||
['legal-history', 'Histórico preservado'],
|
||||
].map(([id, label]) => (
|
||||
<li key={id}>
|
||||
<a
|
||||
className="font-medium underline underline-offset-4"
|
||||
href={`#${id}`}
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
</details>
|
||||
<Panel
|
||||
id="legal-suggestions"
|
||||
title="Consultar sugestões"
|
||||
description="Não havendo uma correspondência documentada, a regra permanece por determinar. As imposições descritas não são valores calculados nem activam taxas."
|
||||
>
|
||||
<form
|
||||
data-query-form="true"
|
||||
method="get"
|
||||
action={url}
|
||||
className="grid gap-3 sm:grid-cols-2"
|
||||
@@ -755,6 +776,7 @@ export default function ImportLegal(props: Props) {
|
||||
))}
|
||||
</Panel>
|
||||
<Panel
|
||||
id="legal-rules"
|
||||
title="Regras preparadas e publicadas"
|
||||
description="Uma nova preparação conserva a última publicação até ser validada. Retirar uma regra impede novas sugestões e conserva as decisões anteriores."
|
||||
>
|
||||
@@ -787,12 +809,13 @@ export default function ImportLegal(props: Props) {
|
||||
</a>
|
||||
{props.canManage && (
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
<Button asChild variant="outline">
|
||||
<a
|
||||
href="#legal-rule-editor"
|
||||
onClick={() => edit(rule)}
|
||||
>
|
||||
Preparar nova versão
|
||||
</a>
|
||||
</Button>
|
||||
{rule.state === 'draft' && (
|
||||
<Button
|
||||
@@ -835,6 +858,7 @@ export default function ImportLegal(props: Props) {
|
||||
</Panel>
|
||||
{props.canManage && action.data.record_key && (
|
||||
<Panel
|
||||
id="legal-decision"
|
||||
title={
|
||||
action.data.action === 'publish'
|
||||
? 'Validar e publicar a versão preparada'
|
||||
@@ -881,6 +905,7 @@ export default function ImportLegal(props: Props) {
|
||||
)}
|
||||
{props.canManage && (
|
||||
<Panel
|
||||
id="legal-rule-editor"
|
||||
title={
|
||||
form.data.record_key
|
||||
? `Preparar revisão da versão ${form.data.version}`
|
||||
@@ -902,13 +927,13 @@ export default function ImportLegal(props: Props) {
|
||||
Preparar a partir do exemplar oficial
|
||||
</h3>
|
||||
<p className="text-sm">
|
||||
Transcrição do anexo da Lei 8/2025, páginas
|
||||
2180-(4) a (7), com início em 01/01/2026. Inclui
|
||||
apenas a taxa geral dessa edição; não é uma
|
||||
pauta consolidada nem determina isenções,
|
||||
preferências ou outras imposições. A preparação
|
||||
continua editável e exige gravação e decisão
|
||||
expressas.
|
||||
Propostas identificadas por fonte, citação e
|
||||
período. Cada uma inclui apenas a imposição
|
||||
demonstrada no respectivo exemplar; não é uma
|
||||
pauta consolidada nem determina os restantes
|
||||
impostos ou preferências. Confira as condições
|
||||
da posição escolhida. A preparação continua
|
||||
editável e exige gravação e decisão expressas.
|
||||
</p>
|
||||
{form.isDirty && (
|
||||
<p className="text-sm">
|
||||
@@ -918,7 +943,7 @@ export default function ImportLegal(props: Props) {
|
||||
</p>
|
||||
)}
|
||||
<label className="grid gap-1">
|
||||
Código do anexo e fonte
|
||||
Proposta do exemplar e fonte
|
||||
<select
|
||||
className={controlClass}
|
||||
value=""
|
||||
@@ -954,9 +979,13 @@ export default function ImportLegal(props: Props) {
|
||||
draft.official_url ?? '',
|
||||
citation: draft.citation,
|
||||
valid_from: draft.valid_from,
|
||||
valid_until: '',
|
||||
match_code: draft.code,
|
||||
suggested_code: draft.code,
|
||||
valid_until:
|
||||
draft.valid_until ?? '',
|
||||
match_code:
|
||||
draft.match_code ?? draft.code,
|
||||
suggested_code:
|
||||
draft.suggested_code ??
|
||||
draft.code,
|
||||
origin_country: '',
|
||||
sector: '',
|
||||
obligations: draft.obligations,
|
||||
@@ -979,9 +1008,12 @@ export default function ImportLegal(props: Props) {
|
||||
key={`${draft.source_id}:${draft.code}`}
|
||||
value={`${draft.source_id}:${draft.code}`}
|
||||
>
|
||||
{draft.code} — {draft.description} —
|
||||
taxa geral {draft.rate_percent}% —
|
||||
fonte #{draft.source_id}
|
||||
{draft.label ??
|
||||
`${draft.code} — ${draft.description}`}{' '}
|
||||
—
|
||||
{draft.rate_label ??
|
||||
`taxa geral ${draft.rate_percent}%`}{' '}
|
||||
— fonte #{draft.source_id}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
@@ -991,6 +1023,7 @@ export default function ImportLegal(props: Props) {
|
||||
<form
|
||||
ref={ref}
|
||||
className="space-y-4"
|
||||
onInvalidCapture={revealInvalidLegalField}
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const operation =
|
||||
@@ -1195,6 +1228,7 @@ export default function ImportLegal(props: Props) {
|
||||
</Panel>
|
||||
)}
|
||||
<Panel
|
||||
id="legal-sources"
|
||||
title="Diplomas disponíveis para consulta"
|
||||
description="Conservar um diploma não publica uma regra nem activa um cálculo. Cada regra usa a citação e o período próprios."
|
||||
>
|
||||
@@ -1217,6 +1251,7 @@ export default function ImportLegal(props: Props) {
|
||||
)}
|
||||
</Panel>
|
||||
<Panel
|
||||
id="legal-estimates"
|
||||
title="Estimativas documentadas das imposições"
|
||||
description="Valores calculados pelas taxas e bases preservadas. Não registam dívida, reserva, pagamento ou custo efectivo."
|
||||
>
|
||||
@@ -1267,7 +1302,7 @@ export default function ImportLegal(props: Props) {
|
||||
<Pages page={props.estimateHistory} />
|
||||
)}
|
||||
</Panel>
|
||||
<Panel title="Histórico preservado">
|
||||
<Panel id="legal-history" title="Histórico preservado">
|
||||
{props.history.data.map((rule) => (
|
||||
<p key={rule.id}>
|
||||
{rule.data.title} · v{rule.version} ·{' '}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
|
||||
import { Head, Link, useForm } from '@inertiajs/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
FormErrors,
|
||||
@@ -64,23 +64,6 @@ type Props = {
|
||||
tenantId: number;
|
||||
};
|
||||
|
||||
function useGuard(dirty: boolean) {
|
||||
const ref = useRef<HTMLFormElement>(null);
|
||||
useEffect(() => {
|
||||
const form = ref.current;
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', { detail: { form, dirty } }),
|
||||
);
|
||||
return () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('sgc:context-dirty', {
|
||||
detail: { form, dirty: false },
|
||||
}),
|
||||
);
|
||||
};
|
||||
}, [dirty]);
|
||||
return ref;
|
||||
}
|
||||
function Pagination({ page }: { page: Page<unknown> }) {
|
||||
return (
|
||||
<nav className="my-3 flex flex-wrap gap-4" aria-label="Páginas">
|
||||
@@ -123,7 +106,7 @@ function ItemForm({
|
||||
'',
|
||||
reason: '',
|
||||
});
|
||||
const ref = useGuard(form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
const submit = (action: string) => {
|
||||
form.transform((data) => ({
|
||||
...data,
|
||||
@@ -291,7 +274,7 @@ function MasterForm({
|
||||
reason: '',
|
||||
},
|
||||
);
|
||||
const ref = useGuard(form.isDirty);
|
||||
const ref = usePreparationDirty(form.isDirty);
|
||||
return (
|
||||
<details className="rounded border p-3">
|
||||
<summary>
|
||||
@@ -386,6 +369,7 @@ export default function ImportTariffs(props: Props) {
|
||||
)}
|
||||
<Panel title="Localizar material ou código">
|
||||
<form
|
||||
data-query-form="true"
|
||||
method="get"
|
||||
action={url}
|
||||
className="flex flex-wrap gap-3"
|
||||
|
||||
@@ -140,6 +140,26 @@ const titles: Record<string, string> = {
|
||||
calendar: 'Reposição e calendário',
|
||||
imports: 'Importações',
|
||||
};
|
||||
const descriptions: Record<string, string> = {
|
||||
contracts:
|
||||
'Organize contratos com vários artigos, vigência e limites globais. Consulte os artigos associados e as versões preservadas.',
|
||||
agreements:
|
||||
'Defina as condições de fornecimento por artigo, fornecedor e local. Acompanhe a vigência dos acordos e a sua ligação aos contratos.',
|
||||
calendar:
|
||||
'Defina os parâmetros de stock por artigo e local e acompanhe as necessidades de reposição e o calendário previsto.',
|
||||
imports:
|
||||
'Acompanhe as ordens importadas, desde o embarque e a chegada até à libertação aduaneira e recepção efectiva.',
|
||||
};
|
||||
const responsibilities: Record<string, string> = {
|
||||
contracts:
|
||||
'Compras prepara os contratos e os artigos associados; o conferente decide de forma independente. A vigência e os limites ficam preservados em cada versão.',
|
||||
agreements:
|
||||
'Compras prepara os acordos por artigo, fornecedor e local; o conferente decide de forma independente. As condições aprovadas orientam as políticas de reposição associadas.',
|
||||
calendar:
|
||||
'Compras prepara as políticas por artigo e local; o conferente decide de forma independente. O acompanhamento apresenta as necessidades e as datas previstas conforme os parâmetros aprovados.',
|
||||
imports:
|
||||
'Logística acompanha embarque e chegada; o responsável aduaneiro comprova a libertação. Armazém confirma a recepção efectiva e Finanças mantém a conferência de facturas e pagamentos nos circuitos existentes.',
|
||||
};
|
||||
const quantity = (value: number | undefined) =>
|
||||
value === undefined
|
||||
? '—'
|
||||
@@ -1435,8 +1455,13 @@ export default function SupplyIndex(props: Props) {
|
||||
<PageTitle
|
||||
eyebrow="Compras · Fornecimento e reposição"
|
||||
title={titles[props.view]}
|
||||
description="Seleccione os cadastros existentes e registe apenas os dados novos desta etapa. A finalidade e a origem são independentes."
|
||||
description={descriptions[props.view]}
|
||||
/>
|
||||
{['agreement', 'policy', 'contract'].includes(props.kind) && (
|
||||
<nav
|
||||
aria-label="Consultas e cadastros de fornecimento"
|
||||
className="flex flex-wrap gap-x-4 gap-y-2"
|
||||
>
|
||||
{(props.kind === 'agreement' ||
|
||||
props.kind === 'policy' ||
|
||||
props.kind === 'contract') && (
|
||||
@@ -1467,6 +1492,8 @@ export default function SupplyIndex(props: Props) {
|
||||
: 'Contratos com vários artigos e limite global'}
|
||||
</Link>
|
||||
)}
|
||||
</nav>
|
||||
)}
|
||||
{props.linkedContractKey && (
|
||||
<p className="rounded border p-3 text-sm">
|
||||
Artigos ligados ao contrato seleccionado.{' '}
|
||||
@@ -1496,12 +1523,7 @@ export default function SupplyIndex(props: Props) {
|
||||
)}
|
||||
<Panel title="Responsabilidades">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Compras prepara os acordos e a reposição; o conferente
|
||||
decide de forma independente. Logística acompanha
|
||||
embarque e chegada; o responsável aduaneiro comprova a
|
||||
libertação. Armazém confirma a recepção efectiva e
|
||||
Finanças mantém a conferência de facturas e pagamentos
|
||||
nos circuitos existentes.
|
||||
{responsibilities[props.view]}
|
||||
</p>
|
||||
</Panel>
|
||||
{props.view === 'calendar' && props.ready && (
|
||||
@@ -1528,6 +1550,8 @@ export default function SupplyIndex(props: Props) {
|
||||
? 'Nova política por artigo e local'
|
||||
: props.kind === 'import'
|
||||
? 'Acompanhar uma ordem importada'
|
||||
: props.kind === 'contract'
|
||||
? 'Novo contrato com vários artigos'
|
||||
: 'Novo acordo de fornecimento'
|
||||
}
|
||||
>
|
||||
@@ -1575,7 +1599,13 @@ export default function SupplyIndex(props: Props) {
|
||||
<Panel
|
||||
key={`${record.record_key}-${record.version}`}
|
||||
title={
|
||||
record.snapshot.item
|
||||
props.kind === 'contract'
|
||||
? typeof record.data.reference ===
|
||||
'string' &&
|
||||
record.data.reference.trim() !== ''
|
||||
? `Contrato ${record.data.reference}`
|
||||
: 'Contrato sem referência indicada'
|
||||
: record.snapshot.item
|
||||
? `${record.snapshot.item.code} · ${record.snapshot.item.name}`
|
||||
: (record.snapshot.order?.number ??
|
||||
'Processo de fornecimento')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Head, Link, router, useForm } from "@inertiajs/react";
|
||||
import { PageTitle, Panel, controlClass } from "@/components/procurement";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { roleLabels, statusLabels } from "@/types/procurement";
|
||||
import { Head, Link, router, useForm } from '@inertiajs/react';
|
||||
import { PageTitle, Panel, controlClass } from '@/components/procurement';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { roleLabels, statusLabels } from '@/types/procurement';
|
||||
|
||||
type Props = {
|
||||
ready: boolean;
|
||||
@@ -61,13 +61,13 @@ export default function Notices({
|
||||
</div>
|
||||
<Panel
|
||||
title={
|
||||
view === "unread"
|
||||
? "Por ler"
|
||||
: view === "outcomes"
|
||||
? "Resultados dos meus pedidos"
|
||||
: view === "tasks"
|
||||
? "Intervenções pendentes"
|
||||
: "Avisos internos"
|
||||
view === 'unread'
|
||||
? 'Por ler'
|
||||
: view === 'outcomes'
|
||||
? 'Resultados dos meus pedidos'
|
||||
: view === 'tasks'
|
||||
? 'Intervenções pendentes'
|
||||
: 'Avisos internos'
|
||||
}
|
||||
description="Intervenções concluídas deixam a fila pendente. Resultados registados mantêm-se visíveis ao requisitante com acesso actual. Não são criados avisos retroactivos para decisões antigas."
|
||||
>
|
||||
@@ -79,6 +79,7 @@ export default function Notices({
|
||||
Localizar por referência da requisição
|
||||
</summary>
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mt-3 flex flex-wrap items-end gap-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
@@ -86,7 +87,7 @@ export default function Notices({
|
||||
...data,
|
||||
view,
|
||||
}));
|
||||
form.get("/requisicoes/avisos", {
|
||||
form.get('/requisicoes/avisos', {
|
||||
preserveState: true,
|
||||
});
|
||||
}}
|
||||
@@ -99,7 +100,7 @@ export default function Notices({
|
||||
value={form.data.search}
|
||||
onChange={(event) =>
|
||||
form.setData(
|
||||
"search",
|
||||
'search',
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
@@ -118,7 +119,7 @@ export default function Notices({
|
||||
</form>
|
||||
</details>
|
||||
<p className="mb-3 text-sm text-muted-foreground">
|
||||
{notices.total} aviso(s) nesta consulta · Página{" "}
|
||||
{notices.total} aviso(s) nesta consulta · Página{' '}
|
||||
{notices.current_page}
|
||||
</p>
|
||||
{!ready ? (
|
||||
@@ -135,32 +136,32 @@ export default function Notices({
|
||||
className="font-medium underline"
|
||||
href={notice.href}
|
||||
>
|
||||
{notice.reference} ·{" "}
|
||||
{notice.reference} ·{' '}
|
||||
{notice.role_label ??
|
||||
roleLabels[notice.role] ??
|
||||
notice.role}
|
||||
</Link>
|
||||
{notice.kind === "outcome" && (
|
||||
{notice.kind === 'outcome' && (
|
||||
<p className="mt-2 text-sm">
|
||||
Resultado registado:{" "}
|
||||
{notice.outcome === "approved"
|
||||
? "requisição aprovada"
|
||||
: notice.outcome === "expired"
|
||||
? "pedido devolvido por expiração"
|
||||
: "requisição rejeitada"}
|
||||
. Estado actual:{" "}
|
||||
Resultado registado:{' '}
|
||||
{notice.outcome === 'approved'
|
||||
? 'requisição aprovada'
|
||||
: notice.outcome === 'expired'
|
||||
? 'pedido devolvido por expiração'
|
||||
: 'requisição rejeitada'}
|
||||
. Estado actual:{' '}
|
||||
{statusLabels[notice.current_status] ??
|
||||
notice.current_status}
|
||||
. Consulte o processo para conhecer o
|
||||
fundamento e os passos seguintes.
|
||||
</p>
|
||||
)}
|
||||
{notice.kind === "reminder" && (
|
||||
{notice.kind === 'reminder' && (
|
||||
<p className="mt-2 text-sm">
|
||||
Lembrete da etapa de aprovação pendente.
|
||||
</p>
|
||||
)}
|
||||
{notice.kind === "escalation" && (
|
||||
{notice.kind === 'escalation' && (
|
||||
<p className="mt-2 text-sm">
|
||||
Alerta de escalamento da etapa pendente.
|
||||
Consulte o processo e os responsáveis
|
||||
@@ -168,7 +169,7 @@ export default function Notices({
|
||||
</p>
|
||||
)}
|
||||
<p className="mt-2 text-sm">
|
||||
{notice.read_at ? "Lido" : "Por ler"} ·
|
||||
{notice.read_at ? 'Lido' : 'Por ler'} ·
|
||||
Criado em {notice.created_at}
|
||||
</p>
|
||||
{!notice.read_at && (
|
||||
|
||||
@@ -98,6 +98,7 @@ export default function Tasks({
|
||||
</div>
|
||||
<Panel title="Trabalho pendente">
|
||||
<form
|
||||
data-query-form="true"
|
||||
className="mb-4 flex flex-wrap items-end gap-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<p>Subtotal sem IVA: {{ $money($order->subtotal_minor) }}<br>IVA: {{ $money($order->tax_minor) }}<br>Total com IVA: {{ $money($order->total_minor) }}</p>
|
||||
@else
|
||||
<p>{{ $snapshot['company']['name'] }} · {{ $snapshot['requisition']['number'] }}</p>
|
||||
<div class="notice"><strong>Documento de desenvolvimento. Não autoriza compras reais.</strong><br>@if(($snapshot['budget_checked'] ?? false) === true) Controlo orçamental confirmado para as parcelas emitidas. @else Orçamento não verificado. @endif @if($snapshot['approval_rules']['rules_provisional']) Regras de aprovação provisórias. @endif</div>
|
||||
<div class="notice"><strong>Documento de desenvolvimento. Não autoriza compras reais.</strong><br>@if(($snapshot['budget_checked'] ?? false) === true) Controlo orçamental registado na emissão. @else Este documento não preserva confirmação do controlo orçamental. @endif @if($snapshot['approval_rules']['rules_provisional']) Regras de aprovação provisórias. @endif</div>
|
||||
<div class="columns">
|
||||
<div><h2>Fornecedor</h2><strong>{{ $snapshot['supplier']['name'] }}</strong><br>NUIT {{ $snapshot['supplier']['nuit'] }}<br><span class="pre">{{ $snapshot['supplier']['address'] }}</span><br>{{ $snapshot['supplier']['contact'] }}<br>{{ $snapshot['supplier']['phone'] }} · {{ $snapshot['supplier']['email'] }}</div>
|
||||
<div><h2>Condições</h2>Entrega: {{ $snapshot['award']['delivery_date'] }}<br><span class="pre">{{ $snapshot['award']['delivery_location'] }}</span><br>Pagamento: {{ $snapshot['quotation']['payment_terms'] }}<br>Proposta: {{ $snapshot['quotation']['reference'] }}<br>{{ $snapshot['department']['name'] }} · {{ $snapshot['cost_center']['code'] }}<br>Emitente: {{ $snapshot['issuer']['name'] }}<br>Emissão: {{ $order->issued_at->format('Y-m-d H:i:s') }}</div>
|
||||
|
||||
@@ -147,12 +147,20 @@ assert.equal(
|
||||
configuredMulti.some((e) => e.id === 'new_request'),
|
||||
true,
|
||||
);
|
||||
const capitalReaders = ['admin', 'procurement', 'finance', 'department_head', 'warehouse'];
|
||||
assert.ok(routes.some((route) => route.uri === 'projectos-imobilizado' && route.method.split('|').includes('GET')));
|
||||
for (const role of [...capitalReaders, 'requester']) {
|
||||
const groups = procurementNavigation([role], false, undefined, false, false, false, true);
|
||||
assert.equal(groups.flatMap((group) => group.entries).some((entry) => entry.id === 'capital_register'), capitalReaders.includes(role));
|
||||
if (capitalReaders.includes(role)) assert.equal(activeProcurementEntry(groups, '/projectos-imobilizado?history=qa'), 'capital_register');
|
||||
}
|
||||
const proof = {
|
||||
checked_at: new Date().toISOString(),
|
||||
result: 'passed',
|
||||
entries: rows.size,
|
||||
roles: 6,
|
||||
configurable_permissions_and_multiple_profiles: true,
|
||||
optional_capital_register_reading_roles: capitalReaders,
|
||||
maximum_functional_groups: 6,
|
||||
source: 'procurementNavigation compared with actual Laravel GET routes',
|
||||
scope: 'Menu routing, active entry and visibility contract; not a substitute for functional or visual workflow acceptance',
|
||||
|
||||
@@ -157,7 +157,7 @@ try {
|
||||
}
|
||||
if (in_array('--operational-orders-focused', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/OperationalOrdersTest.php', 'tests/Feature/PurchaseAwardOrderTest.php',
|
||||
'--filter=operational register|utilisation mode|request links preserve|policy versions and company department|native orders freeze their production origin|metadata authority never opens']];
|
||||
'--filter=operational register|utilisation mode|request links preserve|policy versions and company department|native orders freeze their production origin|metadata authority never opens|operational order search']];
|
||||
}
|
||||
if (in_array('--operational-orders-access-only', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/OperationalOrdersTest.php', '--filter=metadata authority never opens']];
|
||||
@@ -176,6 +176,12 @@ try {
|
||||
if (in_array('--legal-reference-focused', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ImportLegalReferenceDraftsTest.php', 'tests/Feature/ImportLegalRulesTest.php']];
|
||||
}
|
||||
if (in_array('--legal-ice-reference-only', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ImportLegalReferenceDraftsTest.php', '--filter=official second supplement']];
|
||||
}
|
||||
if (in_array('--capital-search-focused', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/CapitalRegisterTest.php', 'tests/Feature/ProcurementSearchTest.php']];
|
||||
}
|
||||
if (in_array('--requisition-cycles-import-regression', $argv, true)) {
|
||||
$commands = [[PHP_BINARY, 'vendor/bin/pest', '--compact', 'tests/Feature/ImportEstimatesTest.php', 'tests/Feature/ImportLandedCostsTest.php']];
|
||||
}
|
||||
|
||||
@@ -12,10 +12,19 @@ const reviewDurationArgs = process.argv.filter(flag => flag.startsWith('--review
|
||||
const reviewDurationMinutes = reviewDurationArgs.length === 0 ? 20 : Number(reviewDurationArgs[0].slice('--review-minutes='.length));
|
||||
if (reviewDurationArgs.length > 1 || !Number.isInteger(reviewDurationMinutes) || reviewDurationMinutes < 1 || reviewDurationMinutes > 60 || (reviewDurationArgs.length > 0 && !process.argv.includes('--native-review'))) throw Error('Native review duration must be one explicit value from1to60minutes');
|
||||
if (process.argv.includes('--legal-reference-preview') && (!process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || !process.argv.some(flag => ['--native-review', '--native-review-http-only'].includes(flag)))) throw Error('Legal preview requires the owned native review with complete pinned private composition');
|
||||
if (process.argv.includes('--vat-reference-preview') && (!process.argv.includes('--legal-reference-preview') || !process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('VAT preview requires the guarded native legal composition');
|
||||
if (process.argv.includes('--private-audit-recovery') && (!process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || process.argv.some(flag => ['--recovery-only', '--race-only', '--native-review', '--native-review-http-only'].includes(flag)))) throw Error('Private audit recovery requires its own complete pinned isolated composition');
|
||||
if (process.argv.includes('--print-pagination-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('Print pagination requires the owned native preview and complete pinned composition');
|
||||
if (process.argv.includes('--native-office-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || process.argv.some(flag => ['--print-pagination-preview', '--legal-reference-preview'].includes(flag)))) throw Error('Office preview requires its own complete pinned native QA composition');
|
||||
if (process.argv.includes('--specific-rate-preview') && (!process.argv.includes('--legal-reference-preview') || !process.argv.includes('--native-review'))) throw Error('Specific coefficient preview requires the owned legal native review');
|
||||
if (process.argv.includes('--ice-reference-preview') && (!process.argv.includes('--legal-reference-preview') || !process.argv.includes('--native-review'))) throw Error('ICE reference preview requires the owned legal native review');
|
||||
if (process.argv.includes('--capital-search-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('Capital search preview requires the owned native review and pinned isolated composition');
|
||||
if (process.argv.includes('--import-documentary-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('Documentary import preview requires the owned native review and pinned isolated composition');
|
||||
if (process.argv.includes('--supplier-review-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('Supplier review requires the owned native preview and pinned isolated composition');
|
||||
if (process.argv.includes('--conflict-release-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || process.argv.includes('--native-office-preview'))) throw Error('Conflict release requires its own guarded native QA composition');
|
||||
if (process.argv.includes('--urgent-stock-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || process.argv.includes('--native-office-preview'))) throw Error('Urgent stock review requires its own guarded native QA composition');
|
||||
if (process.argv.includes('--order-cancellation-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime') || process.argv.includes('--native-office-preview'))) throw Error('Cancellation review requires its own guarded native QA composition');
|
||||
if (process.argv.includes('--operational-search-preview') && (!process.argv.includes('--native-review') || !process.argv.includes('--integrated-schema') || !process.argv.includes('--frozen-runtime'))) throw Error('Operational search preview requires the owned native review and pinned isolated composition');
|
||||
if (path.resolve(process.cwd()) !== workspace) throw Error('Compras workspace required');
|
||||
if (process.argv.includes('--integrated-cycles-only') && !process.argv.includes('--integrated-schema')) throw Error('Integrated cycles require the complete isolated schema composition');
|
||||
if (process.argv.includes('--integrated-orders-only') && !process.argv.includes('--integrated-schema')) throw Error('Integrated orders require the complete isolated schema composition');
|
||||
@@ -118,7 +127,16 @@ try {
|
||||
RQ01_LEDGER_INTEGRATED_SCHEMA: process.argv.includes('--integrated-schema') ? '1' : '0',
|
||||
RQ01_NATIVE_OFFICE_JOURNEY: process.argv.some(flag => ['--native-office-http-only', '--native-office-preview'].includes(flag)) ? '1' : '0',
|
||||
RQ01_QA_LEGAL_REFERENCE: process.argv.includes('--legal-reference-preview') ? '1' : '0',
|
||||
RQ01_QA_VAT_REFERENCE: process.argv.includes('--vat-reference-preview') ? '1' : '0',
|
||||
RQ01_QA_SPECIFIC_RATE: process.argv.includes('--specific-rate-preview') ? '1' : '0',
|
||||
RQ01_QA_ICE_REFERENCE: process.argv.includes('--ice-reference-preview') ? '1' : '0',
|
||||
RQ01_QA_CAPITAL_SEARCH: process.argv.includes('--capital-search-preview') ? '1' : '0',
|
||||
RQ01_QA_IMPORT_DOCUMENTARY: process.argv.includes('--import-documentary-preview') ? '1' : '0',
|
||||
RQ01_QA_SUPPLIER_REVIEW: process.argv.includes('--supplier-review-preview') ? '1' : '0',
|
||||
RQ01_QA_CONFLICT_RELEASE: process.argv.includes('--conflict-release-preview') ? '1' : '0',
|
||||
RQ01_QA_URGENT_STOCK: process.argv.includes('--urgent-stock-preview') ? '1' : '0',
|
||||
RQ01_QA_ORDER_CANCELLATION: process.argv.includes('--order-cancellation-preview') ? '1' : '0',
|
||||
RQ01_QA_OPERATIONAL_SEARCH: process.argv.includes('--operational-search-preview') ? '1' : '0',
|
||||
RQ01_QA_PRINT_PAGINATION: process.argv.includes('--print-pagination-preview') ? '1' : '0' };
|
||||
delete environment.COMMON_FINANCE_BUNDLE_ROOT;
|
||||
delete environment.COMMON_FINANCE_BUNDLE_SHA256;
|
||||
@@ -142,6 +160,27 @@ try {
|
||||
if (!frozenRuntime || !process.argv.includes('--integrated-schema') || setupOnly) throw Error('Runtime guard requires only the frozen isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/RequisitionLedgerAccountsTest.php', '--filter=pinned private runtime refuses');
|
||||
}
|
||||
if (process.argv.includes('--order-document-only')) {
|
||||
if (!frozenRuntime || !process.argv.includes('--integrated-schema') || setupOnly) throw Error('Order document regression requires only the frozen isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/PurchaseAwardOrderTest.php', 'tests/Feature/OrderDocumentNavigationTest.php',
|
||||
'--filter=ordinary controlled order|distributed approved synthetic|award starts a new approval cycle|order and receipt consultations|context links do not grant|print navigation leaves');
|
||||
}
|
||||
if (process.argv.includes('--supplier-evaluation-only')) {
|
||||
if (!frozenRuntime || !process.argv.includes('--integrated-schema') || setupOnly) throw Error('Supplier evaluation regression requires the frozen isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/SupplierEvaluationTest.php');
|
||||
}
|
||||
if (process.argv.includes('--legal-reference-only')) {
|
||||
if (!frozenRuntime || !process.argv.includes('--integrated-schema') || setupOnly) throw Error('Legal reference regression requires the frozen isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/ImportLegalReferenceDraftsTest.php', 'tests/Feature/ImportLegalRulesTest.php');
|
||||
}
|
||||
if (process.argv.includes('--conflict-only')) {
|
||||
if (setupOnly || !frozenRuntime || !process.argv.includes('--integrated-schema')) throw Error('Conflict regression requires the complete pinned isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/ConflictDeclarationTest.php');
|
||||
}
|
||||
if (process.argv.includes('--private-audit-only')) {
|
||||
if (setupOnly || !frozenRuntime || !process.argv.includes('--integrated-schema')) throw Error('Private audit regression requires the complete pinned isolated composition');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/PrivateAuditSourcesTest.php', 'tests/Feature/PrivateAuditAccessTest.php', 'tests/Feature/PrivateAuditExporterTest.php');
|
||||
}
|
||||
if (process.argv.includes('--independent-procurement-only')) {
|
||||
if (setupOnly) throw Error('Independent procurement is a focused native Pest regression');
|
||||
args.splice(0, args.length, 'vendor/bin/pest', '--compact', 'tests/Feature/RequisitionLedgerAccountsTest.php', '--filter=office_with_independent_procurement');
|
||||
@@ -217,14 +256,21 @@ try {
|
||||
if (seed.status !== 0) throw Error('Native review fixture failed: '+(seed.stderr || seed.stdout || '').replaceAll(password, '[private]'));
|
||||
const fixture = JSON.parse(seed.stdout);
|
||||
fs.writeFileSync(path.join(root, 'native-review.json'), JSON.stringify(fixture));
|
||||
const assets = path.join(privateParent, 'sgc-legal-specific-precision-qa-20261128');
|
||||
const assets = path.join(privateParent, 'sgc-legacy-cancellation-qa-20261129');
|
||||
const manifest = fs.readFileSync(path.join(assets, 'manifest.json'));
|
||||
const manifestHash = crypto.createHash('sha256').update(manifest).digest('hex');
|
||||
if (manifestHash !== '9d415ba790aa602b36372d310a4eaa3426670fc521f15efb4166d782e170ac8e') throw Error('Unexpected private review manifest');
|
||||
if (manifestHash !== '99b072435a0b9eccb83d98ab36faceb23f98e510509d2175691269d1958083be') throw Error('Unexpected private review manifest');
|
||||
for (const entry of Object.values(JSON.parse(manifest))) {
|
||||
if (!fs.existsSync(path.join(assets, entry.file))) throw Error('Private review asset missing');
|
||||
}
|
||||
fs.cpSync(assets, path.join(root, 'public/build'), { recursive: true });
|
||||
const staticReviewAssets = ['favicon.ico', 'favicon.svg', 'apple-touch-icon.png'].map(file => {
|
||||
const source = path.join(workspace, 'public', file);
|
||||
if (fs.lstatSync(source).isSymbolicLink()) throw Error('Private review static links refused');
|
||||
const bytes = fs.readFileSync(source);
|
||||
fs.copyFileSync(source, path.join(root, 'public', file));
|
||||
return { file, sha256: crypto.createHash('sha256').update(bytes).digest('hex') };
|
||||
});
|
||||
if (nativeAuditSchemaOnly) {
|
||||
if (!frozenRuntime || !process.argv.includes('--integrated-schema')) throw Error('Audit schema inventory requires the pinned private composition');
|
||||
const schema = spawnSync('php', ['tests/Concurrency/requisition-account-worker.php', database, 'describe-private-audit-schema'], {
|
||||
@@ -271,6 +317,14 @@ try {
|
||||
await new Promise(resolve => setTimeout(resolve, 250));
|
||||
}
|
||||
if (!ready) throw Error('Native review server unavailable: '+diagnostic.replaceAll(password, '[private]'));
|
||||
const staticChecks = await Promise.allSettled(staticReviewAssets.map(async asset => {
|
||||
const response = await fetch(`${url}/${asset.file}`, { redirect: 'manual' });
|
||||
const bytes = Buffer.from(await response.arrayBuffer());
|
||||
if (response.status !== 200 || crypto.createHash('sha256').update(bytes).digest('hex') !== asset.sha256) throw Error('Private review static asset differs: '+asset.file);
|
||||
return asset;
|
||||
}));
|
||||
for (const check of staticChecks) if (check.status === 'rejected') throw check.reason;
|
||||
console.log(JSON.stringify({ private_native_static_assets_verified: true, files: staticChecks.map(check => check.value), operational_changes: false }));
|
||||
if (nativeOfficeOnly) {
|
||||
const { verifyOfficePurchaseHttp } = await import('./requisition-office-http-check.mjs');
|
||||
const result = await verifyOfficePurchaseHttp(url, fixture, async () => {
|
||||
@@ -306,6 +360,30 @@ try {
|
||||
if (reviewServer.exitCode !== null) throw Error('Private native review stopped unexpectedly');
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
}
|
||||
if (process.argv.includes('--conflict-release-preview')) {
|
||||
const state = spawnSync('php', ['tests/Concurrency/requisition-account-worker.php', database, 'read-native-conflict-release'], {
|
||||
cwd: workspace, windowsHide: true, encoding: 'utf8', maxBuffer: 1024 * 1024,
|
||||
env: { ...environment, SGC_REQUISITION_QA_ROOT: root },
|
||||
});
|
||||
if (state.status !== 0) throw Error('Native conflict conservation failed: '+(state.stderr || state.stdout || '').replaceAll(password, '[private]'));
|
||||
console.log(JSON.stringify({ private_native_conflict_release_verified: true, ...JSON.parse(state.stdout), private_manifest_sha256: manifestHash }));
|
||||
}
|
||||
if (process.argv.includes('--urgent-stock-preview')) {
|
||||
const state = spawnSync('php', ['tests/Concurrency/requisition-account-worker.php', database, 'read-native-urgent-stock'], {
|
||||
cwd: workspace, windowsHide: true, encoding: 'utf8', maxBuffer: 1024 * 1024,
|
||||
env: { ...environment, SGC_REQUISITION_QA_ROOT: root },
|
||||
});
|
||||
if (state.status !== 0 || !state.stdout.trim().startsWith('{')) throw Error('Native urgent stock conservation failed: '+(state.stderr || state.stdout || '').replaceAll(password, '[private]'));
|
||||
console.log(JSON.stringify({ private_native_urgent_stock_verified: true, ...JSON.parse(state.stdout), private_manifest_sha256: manifestHash }));
|
||||
}
|
||||
if (process.argv.includes('--order-cancellation-preview')) {
|
||||
const state = spawnSync('php', ['tests/Concurrency/requisition-account-worker.php', database, 'read-native-cancellation'], {
|
||||
cwd: workspace, windowsHide: true, encoding: 'utf8', maxBuffer: 1024 * 1024,
|
||||
env: { ...environment, SGC_REQUISITION_QA_ROOT: root },
|
||||
});
|
||||
if (state.status !== 0 || !state.stdout.trim().startsWith('{')) throw Error('Native cancellation conservation failed: '+(state.stderr || state.stdout || '').replaceAll(password, '[private]'));
|
||||
console.log(JSON.stringify({ private_native_cancellation_verified: true, ...JSON.parse(state.stdout), private_manifest_sha256: manifestHash }));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,21 @@ export async function verifyOfficePurchaseHttp(origin, fixture, readState, progr
|
||||
current = await state();
|
||||
const requestId = current.request.id;
|
||||
const lineId = current.request.items[0].id;
|
||||
let capital = null;
|
||||
if (office.capital_register) {
|
||||
await post(buyer, '/projectos-imobilizado', { operation_key: crypto.randomUUID(), record_key: null, version: 0,
|
||||
type: 'project', code: office.capital_register.code, name: 'Projecto exclusivamente sintético do percurso HTTP',
|
||||
department_id: office.capital_register.department_id, equipment_id: null, reference: 'Origem documental fictícia de ensaio',
|
||||
state: 'active', reason: 'Cadastro próprio de Compras para conferir rastreabilidade sem dados reais' });
|
||||
const register = await buyer.page('/projectos-imobilizado', 'equipment/capital-register');
|
||||
capital = register.props.records.data.find(row => row.data.code === office.capital_register.code);
|
||||
check(capital !== undefined && capital.version === 1, 'own project created through native HTTP');
|
||||
const choices = await owner.page(`/requisicoes/${requestId}/projectos-imobilizado`, 'requisitions/capital-assignments');
|
||||
check(choices.props.canWrite && choices.props.choices.data.some(row => row.id === capital.id), 'request owner sees the native capital destination');
|
||||
await post(owner, `/requisicoes/${requestId}/projectos-imobilizado`, { operation_key: crypto.randomUUID(), version: 0,
|
||||
item_id: lineId, capital_id: capital.id, reason: 'Destino explícito da linha para o projecto estritamente sintético' });
|
||||
check((await owner.request('/projectos-imobilizado')).status === 403, 'assignment visibility does not grant the requester access to the register');
|
||||
}
|
||||
const accountPage = await owner.page(`/requisicoes/${requestId}/contas`, 'requisitions/accounts');
|
||||
const account = accountPage.props.accounts.data[0];
|
||||
check(account !== undefined, 'actual common movement account available');
|
||||
@@ -135,8 +150,32 @@ export async function verifyOfficePurchaseHttp(origin, fixture, readState, progr
|
||||
current = await state();
|
||||
check(current.order.id === orderId && current.financial_fingerprint === issued, 'order replay has no financial or document effect');
|
||||
check(Number(current.order.total_minor) === 10000 && current.order.account_assignments[lineId].data.allocations[0].account.id === account.id, 'order preserves exact amount and native chart attribution');
|
||||
check(current.order.budget_checked === true, 'new order preserves the budget authority confirmation already returned at issuance');
|
||||
if (capital) check(current.order.capital_assignments[lineId].snapshot.source.record_key === capital.record_key
|
||||
&& current.order.capital_assignments[lineId].snapshot.source.version === 1, 'issued order preserves the exact native project version');
|
||||
const financialDocumentsHref = `/facturas?purchase_order_id=${orderId}#invoice-documents`;
|
||||
const financeOrder = await finance.page(`/ordens/${orderId}`, 'purchases/show');
|
||||
check(financeOrder.props.financialDocumentsHref === financialDocumentsHref
|
||||
&& financeOrder.props.relatedProcesses.some(source => source.id === requestId && source.href === `/requisicoes/${requestId}/processo`), 'order navigation preserves exact financial and process context');
|
||||
const printRoute = `/ordens/${orderId}/imprimir`;
|
||||
const printHeaders = { 'X-Inertia': 'true', ...(financeOrder.version === null ? {} : { 'X-Inertia-Version': financeOrder.version }) };
|
||||
const printNavigation = await finance.request(printRoute, { headers: printHeaders });
|
||||
check(printNavigation.status === 409 && printNavigation.headers.get('x-inertia-location') === printRoute, 'authorised print navigation requests the complete HTML document');
|
||||
const printDocument = await finance.request(printRoute);
|
||||
check(printDocument.status === 200 && (await printDocument.text()).includes('Controlo orçamental registado na emissão.'), 'native controlled print preserves the actual budget confirmation');
|
||||
const privatePrint = await owner.request(printRoute, { headers: printHeaders });
|
||||
check(privatePrint.status === 403 && !privatePrint.headers.has('x-inertia-location'), 'requester receives no print redirect without native order access');
|
||||
const buyerOrder = await buyer.page(`/ordens/${orderId}`, 'purchases/show');
|
||||
// This synthetic buyer also has Admin; use the independent Procurement-only reviewer to test redaction.
|
||||
const independentOrder = await procurementReviewer.page(`/ordens/${orderId}`, 'purchases/show');
|
||||
check(buyerOrder.props.financialDocumentsHref === financialDocumentsHref && independentOrder.props.financialDocumentsHref === null,
|
||||
'order financial link follows native Admin/Finance access without Procurement inheritance');
|
||||
|
||||
stage('receipt_and_invoice');
|
||||
const financeReceipt = await finance.page(`/ordens/${orderId}/recepcoes`, 'receipts/order');
|
||||
const warehouseReceipt = await warehouse.page(`/ordens/${orderId}/recepcoes`, 'receipts/order');
|
||||
check(financeReceipt.props.financialDocumentsHref === financialDocumentsHref && warehouseReceipt.props.financialDocumentsHref === null,
|
||||
'receipt navigation exposes financial context only to the native reader');
|
||||
await post(warehouse, '/stock/artigos', { code: 'HTTP-OFFICE-QA', name: 'Material de escritório HTTP QA', unit: 'un' });
|
||||
current = await state();
|
||||
const receipt = { idempotency_key: crypto.randomUUID(), delivery_note: 'HTTP-OFFICE-DELIVERY-QA', received_on: date(0),
|
||||
@@ -145,6 +184,14 @@ export async function verifyOfficePurchaseHttp(origin, fixture, readState, progr
|
||||
await post(warehouse, `/ordens/${orderId}/recepcoes`, receipt, 201);
|
||||
current = await state();
|
||||
const received = current.financial_fingerprint;
|
||||
const confirmedReceiptId = current.order.receipts[0].id;
|
||||
const financialReceiptDetail = await finance.page(`/recepcoes/${confirmedReceiptId}`, 'receipts/show');
|
||||
const warehouseReceiptDetail = await warehouse.page(`/recepcoes/${confirmedReceiptId}`, 'receipts/show');
|
||||
check(financialReceiptDetail.props.financialDocumentsHref === financialDocumentsHref
|
||||
&& warehouseReceiptDetail.props.financialDocumentsHref === null,
|
||||
'confirmed receipt detail offers the exact financial context only to its native reader');
|
||||
current = await state();
|
||||
check(current.financial_fingerprint === received, 'receipt detail consultation preserves financial and stock sources');
|
||||
await post(warehouse, `/ordens/${orderId}/recepcoes`, receipt, 200);
|
||||
current = await state();
|
||||
check(current.financial_fingerprint === received && current.order.receipts.length === 1 && current.stock.movements === 1 && current.stock.quantity_milli === 1000, 'receipt replay preserves one physical movement');
|
||||
@@ -221,15 +268,27 @@ export async function verifyOfficePurchaseHttp(origin, fixture, readState, progr
|
||||
const report = await process.json();
|
||||
check(report.props.stages[7].state === 'restricted' && report.props.stages[8].state === 'restricted'
|
||||
&& !Object.hasOwn(report.props, 'invoices') && !Object.hasOwn(report.props, 'payments') && !Object.hasOwn(report.props, 'bank_snapshot'), 'requester process does not disclose financial or bank records');
|
||||
if (capital) {
|
||||
stage('project_trace');
|
||||
const beforeTrace = current.financial_fingerprint;
|
||||
const trace = await finance.page(`/projectos-imobilizado?history=${capital.record_key}`, 'equipment/capital-register');
|
||||
check(trace.props.trace.orders.data.some(row => row.order_id === orderId), 'project trace reaches its actual issued order');
|
||||
check(trace.props.trace.receipts.data.some(row => row.order_id === orderId), 'project trace reaches its actual physical receipt');
|
||||
check(trace.props.history.data[0].record_key === capital.record_key && trace.props.history.data[0].version === 1, 'project history remains its native version');
|
||||
current = await state();
|
||||
check(current.financial_fingerprint === beforeTrace, 'project trace consultation changes no financial or stock source');
|
||||
}
|
||||
for (const client of Object.values(clients)) await client.logout();
|
||||
return { checks, native_post_requests: commands, fortify_sessions: Object.keys(clients).length,
|
||||
request_id: requestId, order_id: orderId, invoice_id: invoiceId, payment_ids: current.payments.map(p => p.id),
|
||||
request_total_minor: current.request.total_minor, order_total_minor: current.order.total_minor, invoice_total_minor: current.invoice.total_minor,
|
||||
confirmed_payments_minor: current.payments.map(p => p.amount_minor), outstanding_minor: current.invoice.outstanding_minor,
|
||||
budget_consumed_minor: current.budget.balance.consumed_minor, budget_available_minor: current.budget.balance.available_minor,
|
||||
order_budget_checked: current.order.budget_checked,
|
||||
stock_quantity_milli: current.stock.quantity_milli, stock_movements: current.stock.movements, journals: current.journals,
|
||||
explicit_finance_category_total_minor: current.analytics.category_attribution.groups.data[0].amount_minor,
|
||||
all_business_mutations_via_native_http: true, assertions_use_readonly_transactions: true, budget_balance_via_native_http: true,
|
||||
selector_self_final_approval_refused: selectorRefused, synthetic_only: true,
|
||||
project_trace: capital ? { record_key: capital.record_key, code: capital.data.code, version: capital.version, order_id: orderId } : null,
|
||||
real_bank_or_sgf_operations: false, browser_visual_acceptance: false };
|
||||
}
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
<?php
|
||||
|
||||
use App\Models\ConflictDeclaration;
|
||||
use App\Models\ConflictRelease;
|
||||
use App\Models\OrderCancellation;
|
||||
use App\Models\PurchaseOrder;
|
||||
use App\Models\Requisition;
|
||||
use App\Models\User;
|
||||
use App\Services\ConflictGuard;
|
||||
use App\Services\OrderCancellationWorkflow;
|
||||
use App\Services\ProposalComparison;
|
||||
use App\Services\RequisitionAccountAssignments;
|
||||
use App\Services\UrgentQuotationBasis;
|
||||
use Carbon\Carbon;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
@@ -14,7 +23,7 @@ use Tempo\Finance\GeneralLedger\LedgerSchema;
|
||||
|
||||
require __DIR__.'/../../vendor/autoload.php';
|
||||
$app = require __DIR__.'/../../bootstrap/app.php';
|
||||
if (in_array($argv[2] ?? '', ['prepare-native-review', 'read-office-purchase', 'describe-private-audit-schema'], true)) {
|
||||
if (in_array($argv[2] ?? '', ['prepare-native-review', 'read-office-purchase', 'describe-private-audit-schema', 'read-native-conflict-release', 'read-native-urgent-stock', 'read-native-cancellation'], true)) {
|
||||
$privateRoot = realpath(getenv('SGC_REQUISITION_QA_ROOT') ?: '');
|
||||
$boundary = realpath(__DIR__.'/../../storage/framework/testing');
|
||||
$databaseName = getenv('DB_DATABASE') ?: '';
|
||||
@@ -78,6 +87,116 @@ if ($mode === 'read-office-purchase') {
|
||||
}
|
||||
exit;
|
||||
}
|
||||
if ($mode === 'read-native-conflict-release') {
|
||||
if (getenv('RQ01_QA_CONFLICT_RELEASE') !== '1') {
|
||||
throw new LogicException('Conflict assertions require their own synthetic preview.');
|
||||
}
|
||||
$fixture = json_decode(file_get_contents($privateRoot.'/native-review.json'), true, 64, JSON_THROW_ON_ERROR);
|
||||
$context = $fixture['conflict_review'];
|
||||
config(['conflict-releases.qa_enabled' => true]);
|
||||
auth()->guard()->setUser(User::query()->findOrFail($context['author_id']));
|
||||
$state = DB::transaction(function () use ($context) {
|
||||
DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');
|
||||
$originals = ConflictDeclaration::query()->where('user_id', $context['author_id'])->orderBy('id')->get();
|
||||
if (hash('sha256', $originals->toJson()) !== $context['originals_sha256']) {
|
||||
throw new LogicException('Native release must preserve both original declarations.');
|
||||
}
|
||||
foreach ($context['protected_frames'] as $table => $expected) {
|
||||
$rows = DB::table($table)->when($table === 'users', fn ($query) => $query->select(['id', 'tenant_id', 'department_id', 'purchasing_role']))->orderBy('id')->get();
|
||||
if (hash('sha256', $rows->toJson()) !== $expected) {
|
||||
throw new LogicException('Native release changed protected financial, stock or authority frame: '.$table);
|
||||
}
|
||||
}
|
||||
$release = ConflictRelease::query()->sole();
|
||||
$guard = app(ConflictGuard::class);
|
||||
$supplierBlocked = $guard->hasConflict($context['author_id'], $context['supplier_id'], null);
|
||||
$otherProcessBlocked = $guard->hasConflict($context['author_id'], $context['supplier_id'], $context['requisition_id']);
|
||||
if ($release->declaration_id !== $context['declaration_id'] || $release->authorised_by !== $context['direction_id']
|
||||
|| Arr::sortRecursive($release->snapshot) !== Arr::sortRecursive($originals->first()->toArray()) || $supplierBlocked || ! $otherProcessBlocked
|
||||
|| DB::table('audit_logs')->where('action', 'conflict.release_authorised')->count() !== 1) {
|
||||
throw new LogicException('Native direction decision must release only the selected chain once.');
|
||||
}
|
||||
|
||||
return ['release_id' => $release->id, 'declaration_id' => $release->declaration_id,
|
||||
'direction_id' => $release->authorised_by, 'originals_preserved' => true,
|
||||
'financial_stock_and_authority_frames_preserved' => count($context['protected_frames']),
|
||||
'selected_supplier_impediment_released' => ! $supplierBlocked, 'other_process_impediment_still_blocks' => $otherProcessBlocked,
|
||||
'release_audit_count' => 1, 'readonly_transaction' => DB::selectOne('SHOW transaction_read_only')->transaction_read_only === 'on',
|
||||
'synthetic_only' => true, 'operational_changes' => false];
|
||||
});
|
||||
echo json_encode($state, JSON_THROW_ON_ERROR);
|
||||
exit;
|
||||
}
|
||||
if ($mode === 'read-native-urgent-stock') {
|
||||
if (getenv('RQ01_QA_URGENT_STOCK') !== '1') {
|
||||
throw new LogicException('Urgent stock assertions require their own synthetic preview.');
|
||||
}
|
||||
$fixture = json_decode(file_get_contents($privateRoot.'/native-review.json'), true, 64, JSON_THROW_ON_ERROR);
|
||||
$context = $fixture['urgent_stock_review'];
|
||||
config(['urgent-quotations.qa_enabled' => true]);
|
||||
auth()->guard()->setUser(User::query()->findOrFail($context['actor_id']));
|
||||
$state = DB::transaction(function () use ($context) {
|
||||
DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');
|
||||
foreach ($context['protected_frames'] as $table => $expected) {
|
||||
$rows = DB::table($table)->when($table === 'users', fn ($query) => $query->select(['id', 'tenant_id', 'department_id', 'purchasing_role']))->orderBy('id')->get();
|
||||
if (hash('sha256', $rows->toJson()) !== $expected) {
|
||||
throw new LogicException('Urgent evidence changed a protected frame: '.$table);
|
||||
}
|
||||
}
|
||||
$request = Requisition::query()->findOrFail($context['request_id']);
|
||||
$eligible = app(UrgentQuotationBasis::class)->eligible($request);
|
||||
$policy = app(ProposalComparison::class)->inspect($request)['policy'];
|
||||
if (count($eligible) !== 1 || $policy['minimum_proposals'] !== 1 || $policy['normal_minimum_proposals'] !== 3 || $policy['minimum_evaluators'] !== 2
|
||||
|| DB::table('audit_logs')->where('action', 'urgent.stock_minimum_recorded')->where('requisition_id', $request->id)->count() !== 1) {
|
||||
throw new LogicException('Native urgent conference must preserve one valid evidence and independent evaluations.');
|
||||
}
|
||||
|
||||
return ['eligible_evidence' => 1, 'minimum_proposals' => 1, 'normal_minimum_proposals' => 3, 'minimum_evaluators' => 2,
|
||||
'protected_frames_preserved' => count($context['protected_frames']), 'single_audit' => true, 'readonly_transaction' => true, 'synthetic_only' => true];
|
||||
});
|
||||
echo json_encode($state, JSON_THROW_ON_ERROR);
|
||||
exit;
|
||||
}
|
||||
if ($mode === 'read-native-cancellation') {
|
||||
if (getenv('RQ01_QA_ORDER_CANCELLATION') !== '1') {
|
||||
throw new LogicException('Cancellation assertions require their own synthetic preview.');
|
||||
}
|
||||
$fixture = json_decode(file_get_contents($privateRoot.'/native-review.json'), true, 64, JSON_THROW_ON_ERROR);
|
||||
$context = $fixture['cancellation_review'];
|
||||
config(['order_cancellation.enabled' => true]);
|
||||
auth()->guard()->setUser(User::query()->findOrFail($context['finance_id']));
|
||||
$state = DB::transaction(function () use ($context) {
|
||||
DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');
|
||||
foreach ($context['protected_frames'] as $table => $expected) {
|
||||
$rows = DB::table($table)->when($table === 'users', fn ($query) => $query->select(['id', 'tenant_id', 'department_id', 'purchasing_role']))->orderBy('id')->get();
|
||||
if (hash('sha256', $rows->toJson()) !== $expected) {
|
||||
throw new LogicException('Legacy cancellation changed a protected frame: '.$table);
|
||||
}
|
||||
}
|
||||
$order = PurchaseOrder::query()->findOrFail($context['order_id']);
|
||||
$request = Requisition::query()->findOrFail($context['request_id']);
|
||||
$record = OrderCancellation::query()->where('purchase_order_id', $order->id)->sole();
|
||||
$currentSource = Arr::except($request->getAttributes(), ['status', 'updated_at']);
|
||||
$originalSource = Arr::except($context['original_request'], ['status', 'updated_at']);
|
||||
if ($record->status !== 'approved' || $record->created_by !== $context['author_id'] || $record->reviewed_by !== $context['finance_id']
|
||||
|| $request->status !== 'cancelled' || $currentSource !== $originalSource || $order->status !== 'issued'
|
||||
|| hash('sha256', json_encode($order->getAttributes(), JSON_THROW_ON_ERROR)) !== $context['original_order_sha256']
|
||||
|| app(OrderCancellationWorkflow::class)->state($order) !== 'cancelled') {
|
||||
throw new LogicException('Native cancellation must preserve the issued original and independent decision.');
|
||||
}
|
||||
foreach (['requested', 'approved'] as $action) {
|
||||
if (DB::table('audit_logs')->where('action', 'order_cancellation.'.$action)->where('requisition_id', $request->id)->count() !== 1) {
|
||||
throw new LogicException('Native cancellation must create one request and one decision audit.');
|
||||
}
|
||||
}
|
||||
|
||||
return ['original_order_preserved' => true, 'original_status' => 'issued', 'operational_status' => 'cancelled',
|
||||
'source_request_cancelled_only' => true, 'independent_finance_decision' => true, 'protected_frames_preserved' => count($context['protected_frames']),
|
||||
'no_fabricated_legacy_reversal' => true, 'one_request_one_decision' => true, 'readonly_transaction' => true, 'synthetic_only' => true];
|
||||
});
|
||||
echo json_encode($state, JSON_THROW_ON_ERROR);
|
||||
exit;
|
||||
}
|
||||
$financial = static function (): string {
|
||||
$rows = [];
|
||||
foreach (['gl_accounts', 'gl_journals', 'gl_lines', 'requisitions', 'requisition_items', 'invoices', 'invoice_items', 'external_payments', 'budget_entries', 'stock_movements'] as $table) {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
use App\Models\CriticalityLevel;
|
||||
use App\Models\Department;
|
||||
use App\Models\Equipment;
|
||||
use App\Models\SupplyRecord;
|
||||
use App\Models\User;
|
||||
use App\Services\CapitalAssignments;
|
||||
use App\Services\CapitalRegister;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
@@ -27,6 +29,72 @@ beforeEach(function () {
|
||||
'reason' => 'Preparação de referência sintética para testes de compras'];
|
||||
});
|
||||
|
||||
test('capital search returns current metadata literal matches pagination and native history links without business writes', function () {
|
||||
$service = app(CapitalRegister::class);
|
||||
$before = [];
|
||||
foreach (['budget_entries', 'stock_movements', 'invoices', 'purchase_orders'] as $table) {
|
||||
$before[$table] = DB::table($table)->orderBy('id')->get()->toJson();
|
||||
}
|
||||
$old = $service->save($this->f['issuer'], [...$this->input, 'name' => 'OLD-CAPITAL-SEARCH']);
|
||||
$current = $service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(),
|
||||
'record_key' => $old->record_key, 'version' => 1, 'name' => 'NEW-CAPITAL%_SEARCH', 'state' => 'archived']);
|
||||
$read = function (string $query) {
|
||||
$response = $this->get('/compras/pesquisa?'.$query)->assertOk()
|
||||
->assertHeader('Cache-Control', 'max-age=0, no-store, private');
|
||||
$props = $response->viewData('page')['props'];
|
||||
expect($props['capitalSearchAvailable'])->toBeTrue();
|
||||
expect($props['capitalRegisterAvailable'])->toBeTrue();
|
||||
|
||||
return collect($props['groups'])->firstWhere('key', 'capital')['records'];
|
||||
};
|
||||
expect($read('q=OLD-CAPITAL-SEARCH')['total'])->toBe(0);
|
||||
$literal = $read('q='.urlencode('%_'));
|
||||
expect($literal['total'])->toBe(1)->and($literal['data'][0]['id'])->toBe($current->id)
|
||||
->and($literal['data'][0]['detail'])->toBe('archived')
|
||||
->and($literal['data'][0]['title'])->toContain('NEW-CAPITAL%_SEARCH', 'v2')
|
||||
->and(array_keys($literal['data'][0]))->toBe(['id', 'title', 'detail', 'href'])
|
||||
->and($literal['data'][0]['href'])->toBe('/projectos-imobilizado?history='.$old->record_key);
|
||||
$this->get($literal['data'][0]['href'])->assertOk()->assertInertia(fn (Assert $page) => $page->has('history.data', 2));
|
||||
foreach (range(1, 17) as $index) {
|
||||
$service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'code' => 'CAP-PAGE-'.$index]);
|
||||
}
|
||||
$firstPage = $read('q=CAP-PAGE-');
|
||||
expect($firstPage['total'])->toBe(17)->and($firstPage['data'])->toHaveCount(15)
|
||||
->and($firstPage['next_page_url'])->toContain('q=CAP-PAGE-', 'capital_page=2');
|
||||
expect($read('q=CAP-PAGE-&capital_page=2')['data'])->toHaveCount(2);
|
||||
$asset = $service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'code' => 'CAP-ASSET', 'type' => 'asset']);
|
||||
expect($read('q=CAP-ASSET')['data'][0]['title'])->toContain('Imobilizado CAP-ASSET');
|
||||
foreach ($before as $table => $rows) {
|
||||
expect(DB::table($table)->orderBy('id')->get()->toJson())->toBe($rows);
|
||||
}
|
||||
$this->getJson('/compras/pesquisa?q=CAP&capital_page=0')->assertUnprocessable();
|
||||
});
|
||||
|
||||
test('capital search retains tenant departmental permission and QA boundaries', function () {
|
||||
$service = app(CapitalRegister::class);
|
||||
$own = $this->f;
|
||||
$service->save($own['issuer'], $this->input);
|
||||
$foreign = receiptFixture();
|
||||
$this->actingAs($foreign['issuer']);
|
||||
expect($service->searchQuery($foreign['issuer'])?->count())->toBe(0)
|
||||
->and($service->searchQuery($own['issuer']))->toBeNull();
|
||||
$this->actingAs($own['issuer']);
|
||||
$department = Department::query()->create(['tenant_id' => $own['tenant']->id, 'code' => 'OTHER-CAP', 'name' => 'Outro departamento QA']);
|
||||
$service->save($own['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'code' => 'CAP-OTHER', 'department_id' => $department->id]);
|
||||
$head = User::factory()->create(['tenant_id' => $own['tenant']->id, 'department_id' => $own['department']->id]);
|
||||
supplyGrant($head, ['department_head']);
|
||||
$this->actingAs($head);
|
||||
expect($service->searchQuery($head)?->count())->toBe(1);
|
||||
$this->get('/compras/pesquisa?q=CAP-OTHER')->assertOk()->assertViewHas('page', fn (array $page) => collect($page['props']['groups'])->firstWhere('key', 'capital')['records']['total'] === 0);
|
||||
DB::table('organization_profiles')->whereIn('id', DB::table('organization_memberships')->where('user_id', $head->id)->pluck('profile_id'))
|
||||
->update(['permissions' => json_encode(['requester'])]);
|
||||
$this->get('/compras/pesquisa?q=PRJ')->assertInertia(fn (Assert $page) => $page->where('capitalSearchAvailable', false)->where('capitalRegisterAvailable', false)
|
||||
->where('groups', fn ($groups) => ! collect($groups)->contains('key', 'capital')));
|
||||
config(['capital-register.qa_enabled' => false]);
|
||||
supplyGrant($own['issuer'], ['procurement']);
|
||||
$this->actingAs($own['issuer'])->get('/compras/pesquisa?q=PRJ')->assertInertia(fn (Assert $page) => $page->where('capitalSearchAvailable', false));
|
||||
});
|
||||
|
||||
test('own project register versions preserves identity and replay without financial or stock effects', function () {
|
||||
$service = app(CapitalRegister::class);
|
||||
$before = [];
|
||||
|
||||
@@ -53,11 +53,41 @@ test('direction release preserves declarations applies to the complete correctio
|
||||
->and(ConflictRelease::query()->count())->toBe(1)
|
||||
->and(AuditLog::query()->where('action', 'conflict.release_authorised')->count())->toBe(1);
|
||||
$this->get('/conflitos/'.$root->id)->assertInertia(fn (Assert $page) => $page->where('canAuthoriseRelease', false)->where('release.declaration_id', $latest->id));
|
||||
$this->get('/conflitos')->assertInertia(fn (Assert $page) => $page->where('releasedRoots', [$root->id])->where('declarations.data.0.has_conflict', true));
|
||||
$this->actingAs($this->owner)->get('/conflitos')->assertForbidden();
|
||||
$this->actingAs($this->admin);
|
||||
$this->post('/conflitos/'.$latest->id.'/levantamento', [...$input, 'reason' => 'Alteração indevida do fundamento após decisão.'])->assertConflict();
|
||||
ConflictDeclaration::query()->create([...$root->only(['tenant_id', 'user_id', 'supplier_id', 'requisition_id', 'has_conflict', 'known_since', 'reason']), 'declared_at' => now()]);
|
||||
expect($guard->hasConflict($this->buyer->id, $this->supplier->id, $this->r->id))->toBeTrue();
|
||||
});
|
||||
|
||||
test('release consultation is limited to the roots on the visible declaration page', function () {
|
||||
config(['conflict-releases.qa_enabled' => true]);
|
||||
for ($index = 0; $index < 16; $index++) {
|
||||
$this->post('/conflitos', personalConflict($this->supplier->id))->assertSessionHasNoErrors();
|
||||
}
|
||||
$first = ConflictDeclaration::query()->oldest('id')->firstOrFail();
|
||||
$last = ConflictDeclaration::query()->latest('id')->firstOrFail();
|
||||
$this->actingAs($this->owner)->post('/conflitos', personalConflict($this->supplier->id))->assertSessionHasNoErrors();
|
||||
$other = ConflictDeclaration::query()->latest('id')->firstOrFail();
|
||||
$profile = DB::table('organization_profiles')->insertGetId(['tenant_id' => $this->tenant->id, 'name' => 'Compras exclusivamente sintéticas',
|
||||
'permissions' => json_encode(['procurement']), 'version' => 1, 'created_at' => now(), 'updated_at' => now()]);
|
||||
DB::table('organization_memberships')->insert(['tenant_id' => $this->tenant->id, 'user_id' => $this->buyer->id,
|
||||
'profile_id' => $profile, 'maintenance' => false, 'created_at' => now(), 'updated_at' => now()]);
|
||||
configureConflictDirection($this->admin);
|
||||
$this->actingAs($this->admin);
|
||||
foreach ([$first, $last, $other] as $row) {
|
||||
$this->post('/conflitos/'.$row->id.'/levantamento', ['operation_key' => (string) Str::uuid(),
|
||||
'reason' => 'Decisão exclusivamente sintética para conferir a consulta paginada.'])->assertSessionHasNoErrors();
|
||||
}
|
||||
$originals = ConflictDeclaration::query()->orderBy('id')->get()->toJson();
|
||||
$auditCount = AuditLog::query()->count();
|
||||
$this->actingAs($this->buyer)->get('/conflitos')->assertOk()->assertInertia(fn (Assert $page) => $page->has('declarations.data', 15)->where('releasedRoots', [$last->id]));
|
||||
$this->get('/conflitos?page=2')->assertOk()->assertInertia(fn (Assert $page) => $page->has('declarations.data', 1)->where('releasedRoots', [$first->id]));
|
||||
expect(ConflictDeclaration::query()->orderBy('id')->get()->toJson())->toBe($originals)
|
||||
->and(AuditLog::query()->count())->toBe($auditCount);
|
||||
});
|
||||
|
||||
test('direction authority is current scoped and never inherited from admin or finance', function () {
|
||||
config(['conflict-releases.qa_enabled' => true]);
|
||||
$this->post('/conflitos', personalConflict($this->supplier->id))->assertSessionHasNoErrors();
|
||||
|
||||
@@ -8,6 +8,7 @@ use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
require_once __DIR__.'/../Support/ReceiptFixture.php';
|
||||
require_once __DIR__.'/../Support/SupplyFixture.php';
|
||||
@@ -83,3 +84,97 @@ test('an unknown edition never inherits parameters from its title or citation',
|
||||
'snapshot' => ['evidence' => ['sha256' => hash('sha256', 'different edition')]]]);
|
||||
expect(app(ImportLegalReferenceDrafts::class)->forSource($source))->toBe([]);
|
||||
});
|
||||
|
||||
test('the documentary VAT rate requires explicit classification and valuation before a draft can be saved', function () {
|
||||
$path = 'C:/Mac/Home/Documents/TEMPO/Portal Tempo/Legislacao/alteracao CIVA 2023.pdf';
|
||||
if (! is_file($path)) {
|
||||
test()->markTestSkipped('The supplied BR250 edition is required for this real-source integration.');
|
||||
}
|
||||
expect(hash_file('sha256', $path))->toBe(ImportLegalReferenceDrafts::VAT_EDITION_SHA256);
|
||||
$before = [];
|
||||
foreach (['budget_entries', 'stock_movements', 'purchase_orders', 'invoices'] as $table) {
|
||||
$before[$table] = DB::table($table)->orderBy('id')->get()->toJson();
|
||||
}
|
||||
$service = app(ImportLegalRules::class);
|
||||
$source = $service->save($this->f['issuer'], ['operation_key' => (string) Str::uuid(), 'action' => 'source', 'version' => 0,
|
||||
'official_reference' => 'Lei 22/2022; BR I Série250, 28/12/2022, exemplar partilhado',
|
||||
'reason' => 'Exemplar partilhado copiado apenas para QA sintético, sem publicação de taxa.'],
|
||||
new UploadedFile($path, basename($path), 'application/pdf', UPLOAD_ERR_OK, true));
|
||||
$drafts = $service->workspace($this->f['issuer'], $this->f['r'])['referenceDrafts'];
|
||||
expect($drafts)->toHaveCount(1);
|
||||
$draft = $drafts[0];
|
||||
expect($draft['match_code'])->toBe('')->and($draft['suggested_code'])->toBe('')
|
||||
->and($draft['valid_from'])->toBe('2023-01-01')->and($draft['valid_until'])->toBeNull()
|
||||
->and($draft['citation'])->toContain('2238', '2239')->and($draft['charges'][0]['kind'])->toBe('vat')
|
||||
->and($draft['charges'][0]['rate_percent'])->toBe('16')->and($draft['charges'][0]['basis_reference'])->toBe('')
|
||||
->and(array_column(array_slice($draft['charges'], 1), 'method'))->toBe(['unknown', 'unknown', 'unknown']);
|
||||
$input = [...array_intersect_key($draft, array_flip(['source_id', 'title', 'official_reference', 'official_url', 'citation', 'valid_from', 'valid_until', 'obligations', 'charges', 'match_code', 'suggested_code'])),
|
||||
'operation_key' => (string) Str::uuid(), 'record_key' => null, 'version' => 0, 'action' => 'save',
|
||||
'document_types' => [], 'reason' => 'Preparação exclusivamente sintética para conferir os parâmetros explícitos.'];
|
||||
expect(fn () => $service->save($this->f['issuer'], $input))->toThrow(ValidationException::class);
|
||||
$input['match_code'] = $input['suggested_code'] = 'SYNTHETIC-VAT-QA';
|
||||
expect(fn () => $service->save($this->f['issuer'], $input))->toThrow(ValidationException::class);
|
||||
expect(SupplyRecord::query()->where('kind', 'import_legal_rule')->count())->toBe(0);
|
||||
$input['charges'][0]['basis_reference'] = 'Base declarada exclusivamente sintética de100MZN; não representa valoração de uma importação real.';
|
||||
$saved = $service->save($this->f['issuer'], $input);
|
||||
expect($saved->state)->toBe('draft')->and($saved->data['charges'][0]['rate_percent'])->toBe('16.000000')
|
||||
->and($saved->data['match_code'])->toBe('SYNTHETIC-VAT-QA');
|
||||
$estimate = app(ImportLegalAmounts::class)->calculate($saved->data['charges'], ['vat_normal_documentary' => [
|
||||
'value_minor' => 10000, 'quantity' => null, 'quantity_unit' => null, 'source' => 'Synthetic illustrative base, not a real assessment']]);
|
||||
expect($estimate['known_subtotal_minor'])->toBe(1600)->and($estimate['complete'])->toBeFalse()
|
||||
->and($estimate['total_minor'])->toBeNull()->and($estimate['financial_effects'])->toBeFalse();
|
||||
foreach ($before as $table => $rows) {
|
||||
expect(DB::table($table)->orderBy('id')->get()->toJson())->toBe($rows);
|
||||
}
|
||||
Storage::disk('local')->put($source->snapshot['evidence']['path'], 'ALTERED-QA-VAT-COPY');
|
||||
$workspace = $service->workspace($this->f['issuer'], $this->f['r']);
|
||||
expect($workspace['referenceDrafts'])->toBe([])->and($workspace['referenceDraftWarnings'])->toHaveCount(1)
|
||||
->and(hash_file('sha256', $path))->toBe(ImportLegalReferenceDrafts::VAT_EDITION_SHA256);
|
||||
});
|
||||
|
||||
test('the official second supplement supplies only its eleven ICE positions and explicit two-year period', function () {
|
||||
$path = base_path('tmp/pdfs/import-legal-source-review-20261128/law7-2025-official-second-supplement.pdf');
|
||||
if (! is_file($path)) {
|
||||
test()->markTestSkipped('The separately retained official second supplement is required.');
|
||||
}
|
||||
expect(hash_file('sha256', $path))->toBe(ImportLegalReferenceDrafts::ICE_EDITION_SHA256);
|
||||
$service = app(ImportLegalRules::class);
|
||||
$source = $service->save($this->f['issuer'], ['operation_key' => (string) Str::uuid(), 'action' => 'source', 'version' => 0,
|
||||
'official_reference' => 'Lei 7/2025, BR I Série 248, 2.º suplemento, 2180-(21 a 22)',
|
||||
'reason' => 'Official original used only in disposable synthetic QA; no rule activation.'],
|
||||
new UploadedFile($path, basename($path), 'application/pdf', UPLOAD_ERR_OK, true));
|
||||
$before = [];
|
||||
foreach (['budget_entries', 'stock_movements', 'purchase_orders', 'invoices'] as $table) {
|
||||
$before[$table] = DB::table($table)->orderBy('id')->get()->toJson();
|
||||
}
|
||||
$drafts = $service->workspace($this->f['issuer'], $this->f['r'])['referenceDrafts'];
|
||||
$expected = ['8702.10.10' => '20', '8702.10.20' => '25', '8702.20.00' => '20', '8702.30.00' => '20',
|
||||
'8702.40.10' => '0', '8702.40.20' => '0', '8702.90.10' => '20', '8702.90.20' => '25', '8702.90.90' => '0',
|
||||
'8703.80.10' => '5', '8703.80.20' => '15'];
|
||||
expect(array_column($drafts, 'rate_percent', 'code'))->toBe($expected);
|
||||
foreach ($drafts as $draft) {
|
||||
expect($draft['valid_from'])->toBe('2026-01-01')->and($draft['valid_until'])->toBe('2027-12-31')
|
||||
->and($draft['source_id'])->toBe($source->id)->and($draft['source_sha256'])->toBe(ImportLegalReferenceDrafts::ICE_EDITION_SHA256)
|
||||
->and($draft['citation'])->toContain('2.º suplemento', '2180-(22)', $draft['code'])
|
||||
->and($draft['charges'][0]['kind'])->toBe('ice')->and($draft['charges'][0]['rate_percent'])->toBe($expected[$draft['code']])
|
||||
->and(array_column(array_slice($draft['charges'], 1), 'method'))->toBe(['unknown', 'unknown', 'unknown']);
|
||||
$estimate = app(ImportLegalAmounts::class)->calculate($draft['charges'], ['ice_documentary' => [
|
||||
'value_minor' => 10000, 'quantity' => null, 'quantity_unit' => null, 'source' => 'Synthetic 100 MZN illustrative base only']]);
|
||||
expect($estimate['known_subtotal_minor'])->toBe(((int) $expected[$draft['code']]) * 100)
|
||||
->and($estimate['complete'])->toBeFalse()->and($estimate['total_minor'])->toBeNull()->and($estimate['financial_effects'])->toBeFalse();
|
||||
}
|
||||
expect(SupplyRecord::query()->where('kind', 'import_legal_rule')->count())->toBe(0);
|
||||
$draft = collect($drafts)->firstWhere('code', '8703.80.10');
|
||||
$saved = $service->save($this->f['issuer'], [...array_intersect_key($draft, array_flip(['source_id', 'title', 'official_reference', 'official_url', 'citation', 'valid_from', 'valid_until', 'obligations', 'charges'])),
|
||||
'operation_key' => (string) Str::uuid(), 'record_key' => null, 'version' => 0, 'action' => 'save',
|
||||
'match_code' => $draft['code'], 'suggested_code' => $draft['code'], 'document_types' => [],
|
||||
'reason' => 'Explicit synthetic QA preparation of documentary ICE; not publication.']);
|
||||
expect($saved->state)->toBe('draft')->and($saved->data['valid_until'])->toBe('2027-12-31')
|
||||
->and($saved->data['charges'][0]['rate_percent'])->toBe('5.000000');
|
||||
foreach ($before as $table => $rows) {
|
||||
expect(DB::table($table)->orderBy('id')->get()->toJson())->toBe($rows);
|
||||
}
|
||||
Storage::disk('local')->put($source->snapshot['evidence']['path'], 'ALTERED-QA-SECOND-SUPPLEMENT');
|
||||
$workspace = $service->workspace($this->f['issuer'], $this->f['r']);
|
||||
expect($workspace['referenceDrafts'])->toBe([])->and($workspace['referenceDraftWarnings'])->toHaveCount(1);
|
||||
});
|
||||
|
||||
@@ -26,6 +26,80 @@ beforeEach(function () {
|
||||
$this->actingAs($this->admin);
|
||||
});
|
||||
|
||||
test('operational order search retains literal matching pagination and opens the selected native source beyond the first page', function () {
|
||||
config(['operational-orders.qa_enabled' => true]);
|
||||
$service = app(OperationalOrders::class);
|
||||
$service->configure($this->admin, $this->policy);
|
||||
$this->actingAs($this->f['issuer']);
|
||||
$before = [];
|
||||
foreach (['budget_entries', 'stock_movements', 'invoices', 'purchase_orders'] as $table) {
|
||||
$before[$table] = DB::table($table)->orderBy('id')->get()->toJson();
|
||||
}
|
||||
$old = $service->save($this->f['issuer'], [...$this->input, 'reference' => 'OP-FOUND-OLD']);
|
||||
foreach (range(1, 17) as $index) {
|
||||
$service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'reference' => 'OP-PAGE-'.$index]);
|
||||
}
|
||||
$literal = $service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'reference' => 'OP%_LITERAL']);
|
||||
$sourceRows = SupplyRecord::query()->where('kind', 'op_order')->orderBy('id')->get()->toJson();
|
||||
$read = function (string $query) {
|
||||
$response = $this->get('/compras/pesquisa?'.$query)->assertOk()->assertHeader('Cache-Control', 'max-age=0, no-store, private');
|
||||
$props = $response->viewData('page')['props'];
|
||||
expect($props['operationalOrderSearchAvailable'])->toBeTrue();
|
||||
|
||||
return collect($props['groups'])->firstWhere('key', 'operational_orders')['records'];
|
||||
};
|
||||
$page = $read('q=OP-PAGE-');
|
||||
expect($page['total'])->toBe(17)->and($page['data'])->toHaveCount(15)
|
||||
->and($page['next_page_url'])->toContain('q=OP-PAGE-', 'operational_orders_page=2');
|
||||
expect($read('q=OP-PAGE-&operational_orders_page=2')['data'])->toHaveCount(2);
|
||||
$match = $read('q='.urlencode('%_'));
|
||||
expect($match['total'])->toBe(1)->and($match['data'][0]['id'])->toBe($literal->id)
|
||||
->and($match['data'][0]['detail'])->toBe('recorded')->and($match['data'][0]['title'])->toContain('Produção OP%_LITERAL', 'v1')
|
||||
->and(array_keys($match['data'][0]))->toBe(['id', 'title', 'detail', 'href']);
|
||||
$oldMatch = $read('q=OP-FOUND-OLD')['data'][0];
|
||||
expect($oldMatch['href'])->toBe('/ordens-operacionais?order_id='.$old->id.'#op-order-'.$old->id);
|
||||
$this->get($oldMatch['href'])->assertOk()->assertInertia(fn (Assert $page) => $page->has('orders.data', 1)
|
||||
->where('orders.data.0.id', $old->id)->where('selectedOrderId', $old->id));
|
||||
$this->get('/ordens-operacionais?order_id='.$old->id.'&page=999')->assertOk()->assertInertia(fn (Assert $page) => $page
|
||||
->where('orders.current_page', 1)->has('orders.data', 1)->where('orders.data.0.id', $old->id));
|
||||
$this->get('/ordens-operacionais')->assertOk()->assertInertia(fn (Assert $page) => $page->has('orders.data', 15)->where('selectedOrderId', null));
|
||||
$this->getJson('/compras/pesquisa?q=OP&operational_orders_page=0')->assertUnprocessable();
|
||||
$this->getJson('/ordens-operacionais?order_id=0')->assertUnprocessable();
|
||||
expect(SupplyRecord::query()->where('kind', 'op_order')->orderBy('id')->get()->toJson())->toBe($sourceRows);
|
||||
foreach ($before as $table => $rows) {
|
||||
expect(DB::table($table)->orderBy('id')->get()->toJson())->toBe($rows);
|
||||
}
|
||||
});
|
||||
|
||||
test('operational order search and direct source selection retain native departmental tenant and current capability boundaries', function () {
|
||||
config(['operational-orders.qa_enabled' => true]);
|
||||
$service = app(OperationalOrders::class);
|
||||
$service->configure($this->admin, $this->policy);
|
||||
supplyGrant($this->f['issuer'], ['procurement']);
|
||||
$this->actingAs($this->f['issuer']);
|
||||
$own = $service->save($this->f['issuer'], $this->input);
|
||||
$department = Department::query()->create(['tenant_id' => $this->f['tenant']->id, 'code' => 'OP-OTHER', 'name' => 'Outro departamento sintético']);
|
||||
$other = $service->save($this->f['issuer'], [...$this->input, 'operation_key' => (string) Str::uuid(), 'department_id' => $department->id, 'reference' => 'OP-OTHER-SECRET']);
|
||||
$viewer = User::factory()->create(['tenant_id' => $this->f['tenant']->id, 'department_id' => $this->f['department']->id]);
|
||||
supplyGrant($viewer, ['production_order_prepare']);
|
||||
$this->actingAs($viewer);
|
||||
expect($service->searchQuery($viewer)?->pluck('id')->all())->toBe([$own->id]);
|
||||
$this->get('/compras/pesquisa?q=OP-OTHER-SECRET')->assertOk()->assertViewHas('page', fn (array $page) => collect($page['props']['groups'])->firstWhere('key', 'operational_orders')['records']['total'] === 0);
|
||||
$this->get('/ordens-operacionais?order_id='.$other->id)->assertNotFound();
|
||||
$this->get('/ordens-operacionais?order_id='.$own->id)->assertOk();
|
||||
DB::table('organization_profiles')->whereIn('id', DB::table('organization_memberships')->where('user_id', $viewer->id)->pluck('profile_id'))
|
||||
->update(['permissions' => json_encode(['finance'])]);
|
||||
$this->get('/compras/pesquisa?q=OP')->assertInertia(fn (Assert $page) => $page->where('operationalOrderSearchAvailable', false)
|
||||
->where('groups', fn ($groups) => ! collect($groups)->contains('key', 'operational_orders')));
|
||||
$this->get('/ordens-operacionais?order_id='.$own->id)->assertForbidden();
|
||||
$foreign = receiptFixture();
|
||||
$this->actingAs($foreign['issuer']);
|
||||
expect($service->searchQuery($foreign['issuer'])?->count())->toBe(0)->and($service->searchQuery($this->f['issuer']))->toBeNull();
|
||||
$this->get('/ordens-operacionais?order_id='.$own->id)->assertNotFound();
|
||||
config(['operational-orders.qa_enabled' => false]);
|
||||
expect($service->searchQuery($foreign['issuer']))->toBeNull();
|
||||
});
|
||||
|
||||
test('operational register requires explicit origin mode preserves sources and has no financial or stock effects', function () {
|
||||
$this->get('/ordens-operacionais')->assertStatus(503);
|
||||
config(['operational-orders.qa_enabled' => true]);
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\PurchasingRole;
|
||||
use App\Models\User;
|
||||
use App\Services\ReceiptWorkflow;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
|
||||
require_once __DIR__.'/../Support/ReceiptFixture.php';
|
||||
|
||||
test('order and receipt consultations link the exact authorised financial context without business effects', function () {
|
||||
$f = receiptFixture('1.000');
|
||||
$finance = User::factory()->create(['tenant_id' => $f['tenant']->id, 'department_id' => $f['department']->id, 'purchasing_role' => PurchasingRole::Finance]);
|
||||
$receipt = app(ReceiptWorkflow::class)->confirm($f['receiver'], $f['order'], receiptPayload($f));
|
||||
$before = [];
|
||||
foreach (['purchase_orders', 'purchase_order_items', 'invoices', 'external_payments', 'stock_movements', 'budget_entries', 'audit_logs'] as $table) {
|
||||
$before[$table] = DB::table($table)->orderBy('id')->get()->toJson();
|
||||
}
|
||||
$href = '/facturas?purchase_order_id='.$f['order']->id.'#invoice-documents';
|
||||
$this->actingAs($finance)->get('/ordens/'.$f['order']->id)->assertOk()
|
||||
->assertViewHas('page', fn ($page) => $page['encryptHistory'] === true)->assertInertia(fn (Assert $p) => $p
|
||||
->component('purchases/show')->where('financialDocumentsHref', $href)
|
||||
->has('relatedProcesses', 1)->where('relatedProcesses.0.id', $f['r']->id)
|
||||
->where('relatedProcesses.0.href', '/requisicoes/'.$f['r']->id.'/processo'));
|
||||
$this->get('/ordens/'.$f['order']->id.'/recepcoes')->assertOk()->assertInertia(fn (Assert $p) => $p
|
||||
->component('receipts/order')->where('financialDocumentsHref', $href));
|
||||
$this->get('/recepcoes/'.$receipt->id)->assertOk()->assertInertia(fn (Assert $p) => $p
|
||||
->component('receipts/show')->where('financialDocumentsHref', $href));
|
||||
$this->get($href)->assertOk()->assertInertia(fn (Assert $p) => $p->where('focusOrderId', $f['order']->id));
|
||||
foreach ($before as $table => $rows) {
|
||||
expect(DB::table($table)->orderBy('id')->get()->toJson())->toBe($rows);
|
||||
}
|
||||
});
|
||||
|
||||
test('context links do not grant procurement warehouse or foreign identities access to financial documents', function () {
|
||||
$f = receiptFixture();
|
||||
$receipt = app(ReceiptWorkflow::class)->confirm($f['receiver'], $f['order'], receiptPayload($f));
|
||||
$this->actingAs($f['issuer'])->get('/ordens/'.$f['order']->id)->assertOk()->assertInertia(fn (Assert $p) => $p
|
||||
->where('financialDocumentsHref', null)->has('relatedProcesses', 1));
|
||||
$this->get('/facturas?purchase_order_id='.$f['order']->id)->assertForbidden();
|
||||
$this->actingAs($f['receiver'])->get('/ordens/'.$f['order']->id.'/recepcoes')->assertOk()->assertInertia(fn (Assert $p) => $p
|
||||
->where('financialDocumentsHref', null));
|
||||
$this->get('/recepcoes/'.$receipt->id)->assertOk()->assertInertia(fn (Assert $p) => $p
|
||||
->where('financialDocumentsHref', null));
|
||||
$this->get('/facturas?purchase_order_id='.$f['order']->id)->assertForbidden();
|
||||
$foreign = receiptFixture();
|
||||
$other = User::factory()->create(['tenant_id' => $foreign['tenant']->id, 'purchasing_role' => PurchasingRole::Finance]);
|
||||
$this->actingAs($other)->get('/ordens/'.$f['order']->id)->assertNotFound();
|
||||
$this->get('/recepcoes/'.$receipt->id)->assertNotFound();
|
||||
$this->getJson('/facturas?purchase_order_id='.$f['order']->id)->assertUnprocessable();
|
||||
});
|
||||
|
||||
test('print navigation leaves Inertia only after checking the current order access', function () {
|
||||
$f = receiptFixture();
|
||||
$page = $this->actingAs($f['issuer'])->get('/ordens/'.$f['order']->id)->assertOk()->viewData('page');
|
||||
$headers = ['X-Inertia' => 'true'];
|
||||
if ($page['version'] !== null) {
|
||||
$headers['X-Inertia-Version'] = $page['version'];
|
||||
}
|
||||
$route = '/ordens/'.$f['order']->id.'/imprimir';
|
||||
$this->get($route, $headers)->assertStatus(409)->assertHeader('X-Inertia-Location', $route);
|
||||
$this->get($route)->assertOk()->assertSee($f['order']->number);
|
||||
$this->actingAs($f['receiver'])->get($route, $headers)->assertForbidden()->assertHeaderMissing('X-Inertia-Location');
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\PurchasingRole;
|
||||
use App\Models\AuditLog;
|
||||
use App\Models\PrivateAuditExport;
|
||||
use App\Models\SupplierDocument;
|
||||
use App\Models\User;
|
||||
@@ -46,6 +47,11 @@ afterEach(function () {
|
||||
|
||||
test('private audit creates a verified immutable package and replays without duplicating or changing business facts', function () {
|
||||
$before = DB::table('purchase_orders')->orderBy('id')->get()->toJson();
|
||||
foreach (['supplier_evaluation.approved', 'supplier_improvement.closed', 'supplier_response.decided', 'supplier.bank_viewed',
|
||||
'planning.created', 'order_cancellation.approved', 'warehouse_return.confirmed'] as $action) {
|
||||
AuditLog::query()->create(['tenant_id' => $this->actor->tenant_id, 'user_id' => $this->actor->id, 'action' => $action,
|
||||
'after' => ['evidence' => 'SYNTHETIC-EVENT-PAYLOAD-NOT-EXPORTED'], 'created_at' => now()]);
|
||||
}
|
||||
$input = ['operation_key' => (string) Str::uuid(), 'families' => ['configuration', 'purchasing', 'stock', 'finance'], 'purpose' => 'Synthetic QA audit'];
|
||||
$service = app(PrivateAuditExporter::class);
|
||||
$export = $service->generate($this->actor, $input);
|
||||
@@ -55,6 +61,12 @@ test('private audit creates a verified immutable package and replays without dup
|
||||
try {
|
||||
$manifest = json_decode($zip->getFromName('manifesto.json'), true, 512, JSON_THROW_ON_ERROR);
|
||||
expect($manifest['families'])->toHaveCount(4);
|
||||
$events = $zip->getFromName('dados/purchasing/eventos.ndjson');
|
||||
expect($events)->toBeString()->toContain('supplier_evaluation.approved')->toContain('supplier_improvement.closed')->toContain('supplier_response.decided')
|
||||
->toContain('planning.created')->toContain('order_cancellation.approved')
|
||||
->not->toContain('warehouse_return.confirmed')->not->toContain('supplier.bank_viewed')->not->toContain('SYNTHETIC-EVENT-PAYLOAD-NOT-EXPORTED');
|
||||
expect($zip->getFromName('dados/stock/eventos.ndjson'))->toContain('warehouse_return.confirmed')
|
||||
->not->toContain('planning.created')->not->toContain('order_cancellation.approved');
|
||||
foreach ($manifest['datasets'] as $dataset) {
|
||||
if ($dataset['state'] === 'not_installed') {
|
||||
expect($dataset['records'])->toBeNull();
|
||||
|
||||
@@ -101,6 +101,57 @@ test('private audit preserves ordinary data while excluding bank coordinates cre
|
||||
expect($event)->toHaveKey('after_projected')->not->toHaveKey('after');
|
||||
});
|
||||
|
||||
test('purchasing audit includes supplier follow up events without bank events or foreign company history', function () {
|
||||
$included = ['supplier.created', 'supplier.updated', 'supplier.reviewed', 'supplier.document_uploaded', 'supplier.document_downloaded',
|
||||
'supplier_evaluation.approved', 'supplier_improvement.closed', 'supplier_response.decided'];
|
||||
$excluded = ['supplier.bank_viewed', 'supplier.bank_proposed', 'supplier.bank_approved', 'supplier.bank_rejected', 'supplier.future_private_action'];
|
||||
$foreign = Tenant::query()->create(['name' => 'FOREIGN-SUPPLIER-AUDIT']);
|
||||
$foreignActor = User::factory()->create(['tenant_id' => $foreign->id]);
|
||||
foreach ([...$included, ...$excluded] as $action) {
|
||||
AuditLog::query()->create(['tenant_id' => $this->actor->tenant_id, 'user_id' => $this->actor->id,
|
||||
'action' => $action, 'after' => ['evidence' => 'SYNTHETIC-PRIVATE-PAYLOAD'], 'created_at' => now()]);
|
||||
AuditLog::query()->create(['tenant_id' => $foreign->id, 'user_id' => $foreignActor->id, 'action' => $action,
|
||||
'after' => ['evidence' => 'FOREIGN-SYNTHETIC-PRIVATE-PAYLOAD'], 'created_at' => now()]);
|
||||
}
|
||||
$before = DB::table('audit_logs')->orderBy('id')->get()->toJson();
|
||||
$sources = collectedPrivateAuditSources($this->actor, ['purchasing']);
|
||||
$events = $sources['purchasing:audit_logs']['rows'];
|
||||
foreach ($included as $action) {
|
||||
$matches = array_values(array_filter($events, fn ($row) => $row['action'] === $action));
|
||||
expect($matches)->toHaveCount(1)
|
||||
->and((int) $matches[0]['tenant_id'])->toBe($this->actor->tenant_id)
|
||||
->and($matches[0])->not->toHaveKey('after')->not->toHaveKey('before');
|
||||
}
|
||||
expect(array_column($events, 'action'))->not->toContain(...$excluded)
|
||||
->and(json_encode($events, JSON_THROW_ON_ERROR))->not->toContain('SYNTHETIC-PRIVATE-PAYLOAD')
|
||||
->and(DB::table('audit_logs')->orderBy('id')->get()->toJson())->toBe($before);
|
||||
foreach (['stock', 'finance', 'configuration'] as $family) {
|
||||
$other = collectedPrivateAuditSources($this->actor, [$family]);
|
||||
expect(array_column($other[$family.':audit_logs']['rows'], 'action'))->not->toContain(...$included);
|
||||
}
|
||||
});
|
||||
|
||||
test('audit links planning cancellation and warehouse return events to their own source family', function () {
|
||||
$families = ['purchasing' => ['planning.created', 'planning.linked', 'purchase_control.approved', 'cancellation.approved',
|
||||
'order_cancellation.approved', 'order_cancellation_policy.approved'],
|
||||
'stock' => ['warehouse_return.prepared', 'warehouse_return.confirmed', 'warehouse_return.cancelled']];
|
||||
foreach ($families as $actions) {
|
||||
foreach ($actions as $action) {
|
||||
AuditLog::query()->create(['tenant_id' => $this->actor->tenant_id, 'user_id' => $this->actor->id,
|
||||
'action' => $action, 'after' => ['synthetic' => true], 'created_at' => now()]);
|
||||
}
|
||||
}
|
||||
$before = DB::table('audit_logs')->orderBy('id')->get()->toJson();
|
||||
$sources = collectedPrivateAuditSources($this->actor, ['purchasing', 'stock', 'finance', 'configuration']);
|
||||
foreach ($families as $family => $actions) {
|
||||
expect(array_column($sources[$family.':audit_logs']['rows'], 'action'))->toContain(...$actions);
|
||||
foreach (array_diff(['purchasing', 'stock', 'finance', 'configuration'], [$family]) as $other) {
|
||||
expect(array_column($sources[$other.':audit_logs']['rows'], 'action'))->not->toContain(...$actions);
|
||||
}
|
||||
}
|
||||
expect(DB::table('audit_logs')->orderBy('id')->get()->toJson())->toBe($before);
|
||||
});
|
||||
|
||||
test('private audit exposes installed empty data separately from uninstalled optional common sources without calculations or writes', function () {
|
||||
$before = [];
|
||||
foreach (['budget_entries', 'stock_movements', 'external_payments', 'invoices', 'purchase_orders', 'audit_logs'] as $table) {
|
||||
|
||||
@@ -340,11 +340,33 @@ test('a partial native order retains its confirmed imported item classification
|
||||
->and(StockMovement::query()->count())->toBe(1)->and((int) StockMovement::query()->sum('quantity_milli'))->toBe(400);
|
||||
});
|
||||
|
||||
test('ordinary controlled order preserves the common budget confirmation and its original on replay', function () {
|
||||
$adapter = app(CommonBudget::class);
|
||||
$this->actingAs($this->finance);
|
||||
$id = $adapter->for($this->finance)->create(['cost_center_id' => $this->r->cost_center_id, 'year' => (int) now()->year,
|
||||
'kind' => 'operating', 'includes_tax' => true, 'amount_minor' => 20000, 'reason' => 'Dotação exclusivamente sintética para conferir o documento de emissão.']);
|
||||
$this->actingAs($this->admin);
|
||||
$adapter->for($this->admin)->approve($id);
|
||||
$this->actingAs($this->finance);
|
||||
DB::transaction(fn () => app(BudgetWorkflow::class)->record($this->finance, $this->r, 'reserve', 10000, 10000));
|
||||
$this->actingAs($this->buyer);
|
||||
$award = selectPurchaseAward($this);
|
||||
$order = issuePurchaseOrder($this, $award);
|
||||
expect($order->snapshot['budget_checked'])->toBeTrue()->and($order->snapshot['budget_control']['budget_id'])->toBe($id);
|
||||
$original = $order->snapshot;
|
||||
$entries = DB::table('budget_entries')->count();
|
||||
$this->post('/adjudicacoes/'.$award->id.'/emitir')->assertRedirect();
|
||||
expect($order->fresh()->snapshot)->toBe($original)->and(DB::table('budget_entries')->count())->toBe($entries);
|
||||
$this->get('/ordens/'.$order->id.'/imprimir')->assertOk()->assertSee('Controlo orçamental registado na emissão.');
|
||||
});
|
||||
|
||||
test('distributed approved synthetic requisition follows native adjudication approval and issuance without parallel entries', function () {
|
||||
if (! method_exists(BudgetControl::class, 'recordDistribution')) {
|
||||
$this->markTestSkipped('Unpublished common source requires explicit QA selection.');
|
||||
}
|
||||
if (! DB::getSchemaBuilder()->hasTable('budget_distributions')) {
|
||||
budgetDistributionFixtureSchema();
|
||||
}
|
||||
config(['budget-distributions.qa_enabled' => true]);
|
||||
$this->withoutVite();
|
||||
$second = CostCenter::query()->create(['tenant_id' => $this->tenant->id, 'department_id' => $this->department->id, 'code' => 'QA-SPLIT', 'name' => 'Segundo centro sintético']);
|
||||
@@ -370,6 +392,7 @@ test('distributed approved synthetic requisition follows native adjudication app
|
||||
$award = selectPurchaseAward($this);
|
||||
$order = issuePurchaseOrder($this, $award);
|
||||
expect($order->snapshot['budget_control']['phase'])->toBe('commit')
|
||||
->and($order->snapshot['budget_checked'])->toBeTrue()
|
||||
->and(DB::table('budget_distribution_entries')->where('kind', 'commit')->count())->toBe(2)
|
||||
->and(DB::table('budget_entries')->where('requisition_id', $this->r->id)->count())->toBe(0);
|
||||
$before = DB::table('budget_distribution_entries')->count();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user