Commit 5617c6e0 authored by Ibatejsas's avatar Ibatejsas
Browse files

segregando proyecto FrontSigepark

parent 9fda4ff2
No related merge requests found
Pipeline #490 failed with stages
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
# frontSigepark
# SigeparkFront
Front del proyecto SIGEPARK
\ No newline at end of file
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"sigeparkFront": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/sigeparkFront",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "sigeparkFront:build"
},
"configurations": {
"production": {
"browserTarget": "sigeparkFront:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "sigeparkFront:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "sigeparkFront:serve"
},
"configurations": {
"production": {
"devServerTarget": "sigeparkFront:serve:production"
}
}
}
}
}},
"defaultProject": "sigeparkFront"
}
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};
\ No newline at end of file
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('sigeparkFront app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/sigeparkFront'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
This diff is collapsed.
{
"name": "sigepark-front",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@popperjs/core": "^2.4.2",
"bootstrap": "^4.5.0",
"jquery": "^3.5.1",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0-next.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
}
@import './../../../styles.css';
body {
background: url(./../../../assets/img/fondo3.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height: 100vh;
}
table {
color: #ffe600;
}
#tickets {
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
width: 100%;
border-collapse: collapse;
width: 100%;
}
#tickets td,
#tickets th {
border: 1px solid #ffe600;
padding: 8px;
}
#tickets th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
}
.tickets {
margin: 0 0 2em 0;
list-style-type: none;
padding: 0;
color: #405061;
width: 30em;
}
.modal-content {
border-radius: 30px;
border-width: 5px;
border-color: #f3f707;
padding: 10px;
background-color: rgba(0, 0, 0, 0.712);
}
label,
h6,
.close {
color: #ffe600;
}
<body>
<div class="row"></div>
<div class="container-fluid mt-4">
<p class="tituloText">HISTÓRICOS</p>
<div class="row justify-content-center">
<div class="col-auto mb-3">
<div class="card">
<div class="card-body">
<p class="tituloTextCard">HISTÓRICO VEHÍCULOS</p>
<div class="container">
<button
class="btn btn-warning"
data-toggle="modal"
data-target="#modalTicketList"
>
ENTRAR
</button>
</div>
</div>
</div>
</div>
<!--Modales asociados a la primera tarjeta -->
<!-- Modal emergente de la receta, texto descriptivo emergente, tomamos el id "ModalCard1Receta" para referenciarlo en los botones -->
<div class="modal fade" id="modalTicketList" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">
LISTA DE VEHICULOS EN EL PARKING
</h6>
</div>
<div class="row modal-body">
<table id="tickets">
<tr>
<th *ngFor="let col of columns">
{{ col }}
</th>
</tr>
<tr *ngFor="let ticket of tickets">
<td *ngFor="let col of index">
{{ ticket[col] }}
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-warning"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
<!-- Cerramos el modal -->
</div>
</div>
</body>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminHistoricoComponent } from './admin-historico.component';
describe('AdminHistoricoComponent', () => {
let component: AdminHistoricoComponent;
let fixture: ComponentFixture<AdminHistoricoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AdminHistoricoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdminHistoricoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Ticket } from './../../modelo/ticket';
import { TicketsApiService } from './../../servicios/ticket-api.service';
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-admin-historico',
templateUrl: './admin-historico.component.html',
styleUrls: ['./admin-historico.component.css'],
})
export class AdminHistoricoComponent implements OnInit {
config: any;
collection = { count: 10, data: [] };
constructor(private ticketsApiService: TicketsApiService) {}
columns = ['Numero de Ticket', 'Matricula', 'Hora de entrada'];
index = ['id', 'matricula', 'entrada'];
tickets: Ticket[] = [];
ngOnInit(): void {
this.ticketsApiService.getTickets().subscribe(
(response) => {
this.tickets = response;
},
(error) => console.log(error)
);
}
}
@import './../../../styles.css';
body {
background: url(./../../../assets/img/fondo1.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height: 100vh;
}
<body>
<div class="row"></div>
<div class="container-fluid mt-4">
<p class="tituloText">ADMIN</p>
<div class="row justify-content-center">
<div class="col-auto mb-3">
<div class="card">
<div class="card-body">
<p class="tituloTextCard">GESTION DE PLAZAS</p>
<div class="container">
<a routerLink="plazas" >
<button class="btn btn-warning">
MODIFICAR
</button></a>
</div>
</div>
</div>
</div>
<div class="col-auto mb-3">
<div class="card">
<div class="card-body">
<p class="tituloTextCard">HISTÓRICOS</p>
<div class="container">
<a routerLink="historico" >
<button class="btn btn-warning">
VER HISTÓRICO
</button></a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminHomeComponent } from './admin-home.component';
describe('AdminHomeComponent', () => {
let component: AdminHomeComponent;
let fixture: ComponentFixture<AdminHomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AdminHomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdminHomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { PlazaApiService } from './../../servicios/plaza-api.service';
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-admin-home',
templateUrl: './admin-home.component.html',
styleUrls: ['./admin-home.component.css']
})
export class AdminHomeComponent implements OnInit {
plazasTotales: number;
constructor(
private plazasService: PlazaApiService) { }
ngOnInit(): void {
this.setPlazasTotales();
}
setPlazasTotales() {
this.plazasService.getPlazasTotales().subscribe(plazas => this.plazasTotales = plazas);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment