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:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user