New Layout

This commit is contained in:
Marco Santos
2025-07-13 21:43:37 +01:00
parent f51e5dea31
commit 11e532ac9a
183 changed files with 1621 additions and 8377 deletions

View File

@@ -1,6 +1,8 @@
import axios, { AxiosResponse } from 'axios';
import axios from 'axios';
import type { AxiosResponse } from 'axios';
import { NIFType } from '../service/api';
const API_URL = process.env.REACT_APP_API_URL;
const API_URL = import.meta.env.VITE_API_URL;
class GeradorService {
static async GenerateNIF(type: string | null): Promise<any[]> {
@@ -18,6 +20,21 @@ class GeradorService {
}
}
static async ValidateNIF(type: string | null): Promise<any[]> {
try {
const response: AxiosResponse = await axios.get(API_URL + 'Generate/ValidateNIF',
{
params: {
type: type
}
});
return response.data;
} catch (error) {
console.error('Error fetching NIF:', error);
return [];
}
}
static async GenerateNISS(): Promise<any[]> {
try {
@@ -28,6 +45,17 @@ class GeradorService {
return [];
}
}
static async GenerateCC(): Promise<any[]> {
try {
const response: AxiosResponse = await axios.get(API_URL + 'Generate/GenerateCC');
return response.data;
} catch (error) {
console.error('Error fetching NIF:', error);
return [];
}
}
}
export default GeradorService;