se agregaron nuevas caracteristicas
This commit is contained in:
@@ -9,15 +9,16 @@ import {
|
||||
Calendar,
|
||||
X
|
||||
} from 'lucide-react';
|
||||
import { BackupJobItem, ClientItem, api } from '../services/api';
|
||||
import { BackupJobItem, ClientItem, api, SystemSettingsResponse } from '../services/api';
|
||||
|
||||
interface JobsViewProps {
|
||||
jobs: BackupJobItem[];
|
||||
clients: ClientItem[];
|
||||
onRefresh: () => void;
|
||||
settings?: SystemSettingsResponse | null;
|
||||
}
|
||||
|
||||
export const JobsView: React.FC<JobsViewProps> = ({ jobs, clients, onRefresh }) => {
|
||||
export const JobsView: React.FC<JobsViewProps> = ({ jobs, clients, onRefresh, settings }) => {
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [formData, setFormData] = useState({
|
||||
@@ -92,7 +93,17 @@ export const JobsView: React.FC<JobsViewProps> = ({ jobs, clients, onRefresh })
|
||||
alert('Primero debes registrar al menos un cliente Windows.');
|
||||
return;
|
||||
}
|
||||
setFormData((prev) => ({ ...prev, client_id: clients[0].id }));
|
||||
setFormData({
|
||||
client_id: clients[0].id,
|
||||
name: '',
|
||||
source_path: 'C:\\SQLBackups',
|
||||
file_patterns: '*.bak,*.mdf',
|
||||
schedule_cron: '0 2 * * *',
|
||||
keep_daily: settings?.default_keep_daily ?? 7,
|
||||
keep_weekly: settings?.default_keep_weekly ?? 4,
|
||||
keep_monthly: settings?.default_keep_monthly ?? 12,
|
||||
min_stable_time_seconds: 60,
|
||||
});
|
||||
setShowModal(true);
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user