Explorar o código

Prueba front 3

Jose Brito %!s(int64=3) %!d(string=hai) anos
pai
achega
6c544a8c06

+ 35 - 0
sistema-mantenimiento-front/src/custom-theme.scss

@@ -0,0 +1,35 @@
+
+// Custom Theming for Angular Material
+// For more information: https://material.angular.io/guide/theming
+@use '@angular/material' as mat;
+// Plus imports for other components in your app.
+
+// Include the common styles for Angular Material. We include this here so that you only
+// have to load a single css file for Angular Material in your app.
+// Be sure that you only ever include this mixin once!
+@include mat.core();
+
+// Define the palettes for your theme using the Material Design palettes available in palette.scss
+// (imported above). For each palette, you can optionally specify a default, lighter, and darker
+// hue. Available color palettes: https://material.io/design/color/
+$sistema-mantenimiento-front-primary: mat.define-palette(mat.$indigo-palette);
+$sistema-mantenimiento-front-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
+
+// The warn palette is optional (defaults to red).
+$sistema-mantenimiento-front-warn: mat.define-palette(mat.$red-palette);
+
+// Create the theme object. A theme consists of configurations for individual
+// theming systems such as "color" or "typography".
+$sistema-mantenimiento-front-theme: mat.define-light-theme((
+  color: (
+    primary: $sistema-mantenimiento-front-primary,
+    accent: $sistema-mantenimiento-front-accent,
+    warn: $sistema-mantenimiento-front-warn,
+  )
+));
+
+// Include theme styles for core and each component used in your app.
+// Alternatively, you can import and @include the theme mixins for each component
+// that you are using.
+@include mat.all-component-themes($sistema-mantenimiento-front-theme);
+

BIN=BIN
sistema-mantenimiento-front/src/favicon.ico


+ 17 - 0
sistema-mantenimiento-front/src/index.html

@@ -0,0 +1,17 @@
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <title>SistemaMantenimientoFront</title>
+  <base href="/">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="icon" type="image/x-icon" href="favicon.ico">
+  <link rel="preconnect" href="https://fonts.gstatic.com">
+  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
+  <link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp" rel="stylesheet">
+  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+</head>
+<body class="mat-typography">
+  <app-root></app-root>
+</body>
+</html>

+ 12 - 0
sistema-mantenimiento-front/src/main.ts

@@ -0,0 +1,12 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+  enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+  .catch(err => console.error(err));

+ 53 - 0
sistema-mantenimiento-front/src/polyfills.ts

@@ -0,0 +1,53 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ *   2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ *      file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes recent versions of Safari, Chrome (including
+ * Opera), Edge on the desktop, and iOS and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ *  with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ *  (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js';  // Included with Angular CLI.
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */

+ 285 - 0
sistema-mantenimiento-front/src/styles.css

@@ -0,0 +1,285 @@
+/* You can add global styles to this file, and also import other style files */
+@import "~@angular/material/prebuilt-themes/indigo-pink.css";
+
+html,
+body {
+  height: 100%;
+  padding: 0;
+  margin: 0;
+  overflow: hidden;
+  box-sizing: border-box;
+}
+
+body {
+  font-family: Roboto, "Helvetica Neue", sans-serif;
+}
+
+.card-content-container {
+  height: calc(100vh - 265px);
+  padding: 16px 0;
+  box-sizing: border-box;
+}
+
+.table-header {
+  background-color: #EEE;
+  padding: 8px 16px;
+  border-radius: 8px 8px 0 0;
+  border-color: #CCC;
+  border-width: 1px;
+  border-style: solid;
+  display: flex;
+  flex-direction: row;
+}
+
+.table-row-white {
+  padding: 8px 16px;
+  border-color: #CCC;
+  border-width: 0 1px 1px 1px;
+  border-style: solid;
+  display: flex;
+  flex-direction: row;
+}
+
+.table-row-gray {
+  padding: 8px 16px;
+  border-color: #CCC;
+  border-width: 0 1px 1px 1px;
+  border-style: solid;
+  display: flex;
+  flex-direction: row;
+  background-color: #EEE;
+}
+
+.table-cell-header {
+  width: 100%;
+  font-weight: bold;
+}
+
+.table-cell {
+  width: 100%;
+  display: flex;
+  align-items: center;
+}
+
+.table-container {
+  width: 100%;
+  overflow-y: auto;
+  height: 100%;
+}
+
+.loader-container {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.loader-label {
+  margin-top: 16px;
+  animation-name: label-fade;
+  animation-duration: 2s;
+  animation-iteration-count: infinite;
+}
+
+@keyframes label-fade {
+  0% {
+    opacity: 1;
+  }
+
+  50% {
+    opacity: 0.5;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+.error-container {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.full-width {
+  width: 100%;
+}
+
+.ml-8 {
+  margin-left: 8px;
+}
+
+.mr-8 {
+  margin-right: 8px;
+}
+
+.mt-8 {
+  margin-top: 8px;
+}
+
+.centre {
+  text-align: center !important;
+}
+
+footer {
+  background-color: #7c8cf4;
+  width: 100%;
+  padding: 20px;
+  z-index: 10;
+  text-align: center;
+  color: black;
+  position: fixed;
+  bottom: 0;
+}
+
+.mat-tool-bar {
+  background-color: #7c8cf4;
+  position: fixed;
+  z-index: 10000;
+  top: 0;
+}
+
+.menu-align {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  -moz-transform: translate(-50%, -50%);
+  -webkit-transform: translate(-50%, -50%);
+  -ms-transform: translate(-50%, -50%);
+  -o-transform: translate(-50%, -50%);
+  transform: translate(-50%, -50%);
+  padding: 10px 10px 30px 10px;
+}
+
+.headers-align .mat-expansion-panel-header-title,
+.headers-align .mat-expansion-panel-header-description {
+  flex-basis: 0;
+}
+
+.headers-align .mat-expansion-panel-header-description {
+  justify-content: space-between;
+  align-items: center;
+}
+
+.headers-align .mat-form-field+.mat-form-field {
+  margin-left: 8px;
+}
+
+.module-options-container {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+}
+
+.module-option {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.mat-input-element:disabled,
+.mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after {
+  color: rgb(71, 71, 71) !important;
+}
+
+/*Scrollbar firefox*/
+* {
+  scrollbar-width: thin;
+}
+
+/* Estilos para la etiqueta card*/
+.card-normal {
+  width: 1300px;
+  padding: 0;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.card-small {
+  width: 1000px;
+  padding: 0;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.animated {
+  -webkit-animation-duration: 1s;
+  animation-duration: 1s;
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+}
+
+.fast {
+  -webkit-animation-duration: 0.4s;
+  animation-duration: 0.4s;
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+}
+
+/* Estilos para alinear*/
+
+.menu-align {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  -moz-transform: translate(-50%, -50%);
+  -webkit-transform: translate(-50%, -50%);
+  -ms-transform: translate(-50%, -50%);
+  -o-transform: translate(-50%, -50%);
+  transform: translate(-50%, -50%);
+  padding: 10px 10px 30px 10px;
+}
+
+/* Estilos para las tablas y sus complementos */
+
+table {
+  width: 100%;
+}
+
+.table-action {
+  width: 300px;
+}
+
+mat-paginator {
+  padding: 15px 0 0 0;
+}
+
+/* Estilo para los botones de "Registrar y Cancelar"*/
+.divBotones {
+  margin: 5px;
+}
+
+.botonRC {
+  margin: 25px !important;
+}
+
+/* Disabled */
+.mat-input-element:disabled,
+.mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after {
+  color: rgb(71, 71, 71) !important;
+}
+
+footer {
+  background-color: #7c8cf4;
+  width: 100%;
+  padding: 20px;
+  z-index: 10;
+  text-align: center;
+  color: black;
+  position: fixed;
+  bottom: 0;
+  box-shadow: 15px 15px 15px 15px rgba(0, 0, 0, 0.2);
+}
+
+.mat-tool-bar {
+  background-color: #7c8cf4;
+  position: fixed;
+  z-index: 10000;
+  top: 0;
+}

+ 26 - 0
sistema-mantenimiento-front/src/test.ts

@@ -0,0 +1,26 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+  BrowserDynamicTestingModule,
+  platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: {
+  context(path: string, deep?: boolean, filter?: RegExp): {
+    <T>(id: string): T;
+    keys(): string[];
+  };
+};
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+  BrowserDynamicTestingModule,
+  platformBrowserDynamicTesting(),
+);
+
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);