diff --git a/package-lock.json b/package-lock.json index fd7da49..7d2be30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8383,6 +8383,14 @@ "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-5.2.0.tgz", "integrity": "sha512-fh+OmaEdxCZnVLQFLqexdw4Xv0Lp2Ueq7un52gF26lTENhTAypGWgf2c92HXzbp4W/B0tnwIZ9mzQPwdDMH91w==" }, + "ngx-spinner": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ngx-spinner/-/ngx-spinner-8.1.0.tgz", + "integrity": "sha512-VtIcKsxe+cNj9zCelNesSJZ/xarjxKL86GQG9h4JM++/Hf7HUJtPDBWXZ6lBk0CpgWdJ4++XX3aeOntI92ApEw==", + "requires": { + "tslib": "^1.9.0" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/package.json b/package.json index c5257d0..6a3ecd6 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "jquery": "^3.4.1", "js-sha256": "^0.9.0", "ngx-bootstrap": "^5.2.0", + "ngx-spinner": "^8.1.0", "popper.js": "^1.16.0", "rxjs": "~6.4.0", "tslib": "^1.10.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index ac75c08..13c2c01 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -47,6 +47,10 @@ const routes: Routes = [ path: 'pedidos-salientes', loadChildren: () => import('./modules/pedidos-salientes/pedidos-salientes.module').then(m => m.PedidosSalientesModule) }, + { + path: 'comanda', + loadChildren: () => import('./modules/comanda/comanda.module').then(m => m.ComandaModule) + }, { path: '**', redirectTo: '', pathMatch: 'full' }, ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 9024416..c15c65e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,6 +10,7 @@ import { SplashScreenComponent } from './modules/splash-screen/splash-screen.com import { AdminComponent } from './modules/admin/admin.component'; import { FooterComponent } from './shared/footer/footer.component'; import { SharedModule } from './modules/shared/shared.module'; +import { NgxSpinnerModule } from "ngx-spinner"; @NgModule({ declarations: [ @@ -28,6 +29,7 @@ import { SharedModule } from './modules/shared/shared.module'; ReactiveFormsModule, ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), SharedModule.forRoot(), + NgxSpinnerModule, ], bootstrap: [AppComponent] }) diff --git a/src/app/interfaces/IComanda.ts b/src/app/interfaces/IComanda.ts new file mode 100644 index 0000000..26209cb --- /dev/null +++ b/src/app/interfaces/IComanda.ts @@ -0,0 +1,34 @@ +export interface IComanda { + id: string; + estado: number; + observacion: string; + pedidoAnombreDe: string; + paraLlevar: boolean; + detalles: IComandaDetalle[]; + timerElaboracion?: any; + secondsElaboracion?: any; + hoursElaboracion?: any; + secondsPedido?: any; + hoursPedido?: any; +} + +export interface IComandaDetalle { + DetLar: string; + CodArt: number; + CodSec: number; + cantidad: number; + idArticulo: number; + componentes: IComponente[]; + seeDetalle?: boolean; +} + +export interface IComponente { + CodArt: number; + CodSec: number; + DetArt: string; + esSustraible: number; + esAdicionable: number; + tipoArticulo: number; + cantidadSeleccionada: number; + importeAdicional: number; +} diff --git a/src/app/modules/comanda/comanda-routing.module.ts b/src/app/modules/comanda/comanda-routing.module.ts new file mode 100644 index 0000000..5f023f9 --- /dev/null +++ b/src/app/modules/comanda/comanda-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ComandaComponent } from './comanda.component'; + + +const routes: Routes = [ + { path: '', component: ComandaComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ComandaRoutingModule { } diff --git a/src/app/modules/comanda/comanda.component.html b/src/app/modules/comanda/comanda.component.html new file mode 100644 index 0000000..73a9480 --- /dev/null +++ b/src/app/modules/comanda/comanda.component.html @@ -0,0 +1,83 @@ +
Pedidos a elaborar
++ {{rellenar(comanda.id.toString().slice(0), 3)}} +
++ {{comanda.pedidoAnombreDe ? comanda.pedidoAnombreDe.toUpperCase() : ''}} +
+ ++
+ {{comanda.hoursPedido}}:{{comanda.minutesPedido}}:{{comanda.secondsPedido}} +
++
+
+ {{detalle.DetLar}}
+ CANT.{{detalle.cantidad}}
+
sYMywBYodTJ{QR&IawM8DNg98SpkA^?ya!ujK1v~NF^
zj@qyL_gPH2{`~nywxTl8!^y>EwYqS^YyYRBn=Huf@Jb&G!7rQnD64J$>kOdostCW^
z2pe_8!oy2R#GBLXOcZlI;%1zx!d2Q#n#sZ~#LKiS}7@%u_ShNjJX;N9oDO
z3>27H$?zpvVSXttN^R56@gu!!oQF0=^T6!3ezFkivJG|dh-