Exportar excel con imagen y ahora guarda las imagenes como .png

This commit is contained in:
2026-02-05 18:09:05 -04:00
parent 63c39e399e
commit f1bdce317f
13 changed files with 250 additions and 332 deletions

View File

@@ -1,5 +1,5 @@
'use server';
import { safeFetchApi } from '@/lib';
import { safeFetchApi } from '@/lib/fetch.api';
import { loginResponseSchema, UserFormValue } from '../schemas/login';
type LoginActionSuccess = {
@@ -20,9 +20,9 @@ type LoginActionSuccess = {
}
type LoginActionError = {
type: 'API_ERROR' | 'VALIDATION_ERROR' | 'UNKNOWN_ERROR'; // **Asegúrate de que el tipo de `type` sea este aquí**
message: string;
details?: any;
type: 'API_ERROR' | 'VALIDATION_ERROR' | 'UNKNOWN_ERROR'; // **Asegúrate de que el tipo de `type` sea este aquí**
message: string;
details?: any;
};
// Si SignInAction también puede devolver null, asegúralo en su tipo de retorno
@@ -37,7 +37,7 @@ export const SignInAction = async (payload: UserFormValue): Promise<LoginActionR
);
if (error) {
return {
type: error.type as 'API_ERROR' | 'VALIDATION_ERROR' | 'UNKNOWN_ERROR',
type: error.type as 'API_ERROR' | 'VALIDATION_ERROR' | 'UNKNOWN_ERROR',
message: error.message,
details: error.details
};