| {{ 'columnActions' | translate }} |
-
-
diff --git a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts
index 030387c..a4a5f2e 100644
--- a/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts
+++ b/ogWebconsole/src/app/components/commands/commands-task/commands-task.component.ts
@@ -3,16 +3,11 @@ import { HttpClient } from '@angular/common/http';
import { MatDialog } from '@angular/material/dialog';
import { ToastrService } from 'ngx-toastr';
import { CreateTaskComponent } from './create-task/create-task.component';
-import { DetailTaskComponent } from './detail-task/detail-task.component';
import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component';
import { JoyrideService } from 'ngx-joyride';
import { ConfigService } from '@services/config.service';
-import {CreateTaskScheduleComponent} from "./create-task-schedule/create-task-schedule.component";
-import {ShowClientsComponent} from "../../ogdhcp/show-clients/show-clients.component";
-import {Subnet} from "../../ogdhcp/og-dhcp-subnets.component";
import {ShowTaskScheduleComponent} from "./show-task-schedule/show-task-schedule.component";
import {ShowTaskScriptComponent} from "./show-task-script/show-task-script.component";
-import {CreateTaskScriptComponent} from "./create-task-script/create-task-script.component";
import {DatePipe} from "@angular/common";
@Component({
@@ -114,28 +109,6 @@ export class CommandsTaskComponent implements OnInit {
});
}
- manageScheduleAction(task: any): void {
- this.dialog.open(CreateTaskScheduleComponent, {
- width: '800px',
- data: { task },
- }).afterClosed().subscribe( result => {
- if (result) {
- this.loadTasks();
- }
- })
- }
-
- manageScriptAction(task: any): void {
- this.dialog.open(CreateTaskScriptComponent, {
- width: '900px',
- data: { task },
- }).afterClosed().subscribe( result => {
- if (result) {
- this.loadTasks();
- }
- })
- }
-
onPageChange(event: any): void {
this.page = event.pageIndex + 1;
this.itemsPerPage = event.pageSize;
diff --git a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.css b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.css
index 1a0cf6f..19d8d6d 100644
--- a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.css
+++ b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.css
@@ -1,128 +1,243 @@
.dialog-title {
- font-weight: bold;
+ color: #333;
+ font-weight: 600;
+ border-bottom: 2px solid #e0e0e0;
+ padding-bottom: 16px;
+ margin: 0;
+}
+
+.dialog-content {
+ padding: 40px;
+ margin-top: 20px;
+ margin-bottom: 20px;
}
.task-form {
- padding: 20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ padding: 0;
}
-.full-width {
+.w-full {
width: 100%;
}
+.w-half {
+ width: 48%;
+}
+
.custom-time {
display: flex;
- gap: 15px;
-}
-
-.w-half {
- width: 50%;
-}
-
-mat-form-field {
- margin-bottom: 16px;
-}
-
-form {
- display: flex;
- flex-direction: column;
gap: 16px;
- margin: auto;
+ flex-wrap: wrap;
}
-mat-form-field {
- width: 100%;
-}
-
-.action-container {
- display: flex;
- justify-content: flex-end;
- gap: 1em;
- padding: 1.5em;
+.section-label {
+ display: block;
+ font-weight: 600;
+ color: #333;
+ margin-bottom: 12px;
+ font-size: 0.9rem;
}
.weekday-toggle-group {
display: flex;
- justify-content: space-between;
gap: 8px;
- margin-bottom: 16px;
+ flex-wrap: wrap;
}
.weekday-toggle {
- flex: 1;
- padding: 8px 0;
- border: 1px solid #ccc;
- border-radius: 4px;
- background: #f5f5f5;
+ padding: 8px 12px;
+ border: 2px solid #e0e0e0;
+ background: white;
+ border-radius: 20px;
cursor: pointer;
+ transition: all 0.3s ease;
+ font-size: 0.85rem;
font-weight: 500;
- transition: background 0.2s ease;
+ min-width: 60px;
+}
+
+.weekday-toggle:hover {
+ border-color: #2196f3;
+ background: #f3f8ff;
}
.weekday-toggle.selected {
- background: #1976d2;
+ background: #2196f3;
color: white;
- border-color: #1976d2;
-}
-
-.month-toggle-group {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- margin-bottom: 16px;
+ border-color: #2196f3;
}
.month-toggle-row {
display: flex;
gap: 8px;
margin-bottom: 8px;
- justify-content: space-between;
}
.month-toggle {
- flex: 1;
- padding: 8px;
- min-width: 48px;
- border: 1px solid #ccc;
- border-radius: 6px;
- background-color: #f0f0f0;
- text-align: center;
+ padding: 6px 10px;
+ border: 2px solid #e0e0e0;
+ background: white;
+ border-radius: 16px;
cursor: pointer;
- transition: background-color 0.2s ease;
+ transition: all 0.3s ease;
+ font-size: 0.8rem;
+ font-weight: 500;
+ min-width: 50px;
+}
+
+.month-toggle:hover {
+ border-color: #4caf50;
+ background: #f1f8e9;
}
.month-toggle.selected {
- background-color: #4caf50;
+ background: #4caf50;
color: white;
border-color: #4caf50;
}
-.summary-card {
- background: #f9fafb;
- border-left: 5px solid #3f51b5;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- border-radius: 12px;
- padding: 16px;
- transition: box-shadow 0.3s ease;
-}
-
-.summary-card:hover {
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
-}
-
-.summary-card {
- background-color: #e3f2fd;
- border-left: 4px solid #2196f3;
- padding: 12px 16px;
- margin-top: 16px;
- border-radius: 6px;
+.enabled-checkbox {
display: flex;
align-items: center;
gap: 8px;
- font-size: 14px;
+ padding: 16px;
+ background: #f8f9fa;
+ border-radius: 8px;
+ border: 1px solid #e0e0e0;
+}
+
+.checkbox-icon {
+ color: #4caf50;
+}
+
+/* Resumen mejorado */
+.summary-card {
+ background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
+ border: 1px solid #bbdefb;
+ border-radius: 12px;
+ margin-top: 20px;
+}
+
+.summary-title {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ color: #1976d2;
+ font-size: 1.1rem;
+ margin: 0;
+}
+
+.summary-title mat-icon {
+ font-size: 24px;
+}
+
+.schedule-summary {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.summary-item {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ padding: 8px 0;
+ border-bottom: 1px solid rgba(25, 118, 210, 0.1);
+}
+
+.summary-item:last-child {
+ border-bottom: none;
+}
+
+.summary-icon {
+ color: #1976d2;
+ font-size: 20px;
}
.summary-text {
- color: #0d47a1;
+ color: #333;
+ font-size: 0.95rem;
line-height: 1.4;
}
+
+/* Acciones */
+.action-container {
+ display: flex;
+ justify-content: flex-end;
+ gap: 12px;
+ padding: 20px;
+ border-top: 1px solid #e0e0e0;
+}
+
+.ordinary-button {
+ background: #f5f5f5;
+ color: #333;
+ border: 1px solid #ddd;
+ padding: 10px 20px;
+ border-radius: 6px;
+ cursor: pointer;
+ transition: all 0.3s ease;
+}
+
+.ordinary-button:hover {
+ background: #e0e0e0;
+}
+
+.submit-button {
+ background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
+ color: white;
+ border: none;
+ padding: 10px 24px;
+ border-radius: 6px;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ font-weight: 500;
+}
+
+.submit-button:hover:not(:disabled) {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
+}
+
+.submit-button:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+}
+
+.submit-button mat-icon {
+ font-size: 18px;
+}
+
+/* Responsive */
+@media (max-width: 768px) {
+ .custom-time {
+ flex-direction: column;
+ }
+
+ .w-half {
+ width: 100%;
+ }
+
+ .weekday-toggle-group {
+ justify-content: center;
+ }
+
+ .month-toggle-row {
+ justify-content: center;
+ }
+
+ .action-container {
+ flex-direction: column;
+ }
+
+ .submit-button, .ordinary-button {
+ width: 100%;
+ justify-content: center;
+ }
+}
diff --git a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.html b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.html
index 0cb7fc9..186ff83 100644
--- a/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.html
+++ b/ogWebconsole/src/app/components/commands/commands-task/create-task-schedule/create-task-schedule.component.html
@@ -1,4 +1,6 @@
-Programar accion
+
+ {{ data.schedule ? 'Editar' : 'Crear' }} Programación de Tarea
+
|