Merge pull request 'feature/hub-admin-global-access' (#410) from feature/hub-admin-global-access into development

Reviewed-on: ADUANASOFT/anexo76#410
This commit is contained in:
2026-05-20 16:31:09 +00:00
15 changed files with 251 additions and 174 deletions

View File

@@ -256,6 +256,8 @@ export interface Company {
}
export interface CompanyCreate {
/** Solo requerido cuando hub_admin crea una empresa (no tiene tenant_id en token) */
tenant_id?: number | null;
name?: string | null;
rfc?: string | null;
curp?: string | null;

View File

@@ -104,6 +104,8 @@
// Construir payload limpiando strings vacíos a null
const dataToSend = {
// Hub admin no tiene tenant_id en token; lo tomamos de la empresa activa
tenant_id: companyStore.activeCompany?.tenant_id ?? undefined,
name: formData.name.trim(),
rfc: formData.rfc.trim(),
curp: formData.curp.trim() || null,

View File

@@ -589,6 +589,8 @@
const payload = {
...formData,
// Hub admin no tiene tenant_id en token; se infiere de la empresa activa en contexto
tenant_id: companyStore.activeCompany?.tenant_id ?? undefined,
name: formData.name.trim(),
rfc: formData.rfc.trim(),
responsible: