Procházet zdrojové kódy

Fix styles for create/edit factura

tati před 9 roky
rodič
revize
0a63a11f6e

+ 2 - 1
controllers/editPedidoCtrl.js

@@ -1,5 +1,6 @@
 /* globals pedidosService: true */
 app.controller('editPedidoCtrl', function ($scope, $http, $routeParams, notify, $location, $timeout, editing, pedidosService) {
+	$scope.titulo = 'Crear pedido';
 	$scope.cero=true;
 	$scope.total=0;
 	$scope.observaciones="";
@@ -22,7 +23,7 @@ app.controller('editPedidoCtrl', function ($scope, $http, $routeParams, notify,
 		});
 
 		if (editing) {
-
+			$scope.titulo = 'Editar pedido';
 			$http.get('back/pedido/'+$routeParams.hash+'/'+$routeParams.id).then(
 			function(data) {
 	   			$scope.listaproductos = data.data.productos; 

+ 0 - 0
controllers/facturaCtrl.js


+ 38 - 0
images/calendar.svg

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="100px" height="100.496px" viewBox="0 0 100 100.496" enable-background="new 0 0 100 100.496" xml:space="preserve">
+<g display="none">
+	<path display="inline" d="M2806.723,8254.026h-9506.289c-16.005,0-29.1-13.095-29.1-29.099V-892.5c0-16.005,13.095-29.1,29.1-29.1
+		h9506.289c16.005,0,29.1,13.094,29.1,29.1v9117.418C2835.83,8240.932,2822.735,8254.026,2806.723,8254.026z"/>
+</g>
+<g>
+	<g>
+		<g>
+			<path fill="#324875" d="M90.017,100.496c5.505,0,9.983-4.479,9.983-9.984V18.716c0-5.505-4.479-9.983-9.983-9.983h-2.365V4.944
+				c0-2.72-2.226-4.944-4.944-4.944h-0.5c-2.719,0-4.943,2.224-4.943,4.944v3.789H66.012V4.944c0-2.72-2.224-4.944-4.944-4.944
+				h-0.499c-2.719,0-4.944,2.224-4.944,4.944v3.789H44.373V4.944C44.373,2.224,42.149,0,39.43,0h-0.499
+				c-2.719,0-4.944,2.224-4.944,4.944v3.789H22.734V4.944C22.734,2.224,20.51,0,17.791,0h-0.499c-2.719,0-4.945,2.224-4.945,4.944
+				v3.789H9.982C4.479,8.733,0,13.212,0,18.716v71.796c0,5.505,4.479,9.984,9.982,9.984H90.017L90.017,100.496z M7.048,90.512v-60.7
+				h85.904v60.7c0,1.619-1.317,2.938-2.936,2.938H9.982C8.363,93.449,7.048,92.131,7.048,90.512z"/>
+			<path fill="#324875" d="M19.178,50.463H30.62c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.472-2.004-4.477-4.477-4.477H19.178
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C14.701,48.459,16.706,50.463,19.178,50.463z"/>
+			<path fill="#324875" d="M44.278,50.463h11.442c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.472-2.005-4.477-4.477-4.477H44.278
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C39.802,48.459,41.806,50.463,44.278,50.463z"/>
+			<path fill="#324875" d="M69.38,50.463h11.442c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.472-2.005-4.477-4.477-4.477H69.38
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C64.903,48.459,66.908,50.463,69.38,50.463z"/>
+			<path fill="#324875" d="M19.178,68.766H30.62c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.473-2.004-4.477-4.477-4.477H19.178
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C14.701,66.763,16.706,68.766,19.178,68.766z"/>
+			<path fill="#324875" d="M44.278,68.766h11.442c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.473-2.005-4.477-4.477-4.477H44.278
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C39.802,66.763,41.806,68.766,44.278,68.766z"/>
+			<path fill="#324875" d="M69.38,68.766h11.442c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.473-2.005-4.477-4.477-4.477H69.38
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C64.903,66.763,66.908,68.766,69.38,68.766z"/>
+			<path fill="#324875" d="M19.178,87.069H30.62c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.473-2.004-4.477-4.477-4.477H19.178
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C14.701,85.065,16.706,87.069,19.178,87.069z"/>
+			<path fill="#324875" d="M44.278,87.069h11.442c2.472,0,4.477-2.004,4.477-4.477v-4.644c0-2.473-2.005-4.477-4.477-4.477H44.278
+				c-2.472,0-4.477,2.004-4.477,4.477v4.644C39.802,85.065,41.806,87.069,44.278,87.069z"/>
+		</g>
+	</g>
+</g>
+</svg>

+ 12 - 0
images/total.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="100px" height="148.372px" viewBox="0 36.5 100 148.372" enable-background="new 0 36.5 100 148.372" xml:space="preserve">
+<path fill="#324875" d="M62.146,94.294c-16.626-5.521-16.626-7.467-16.626-8.756c0-3.15,5.273-3.619,8.417-3.619
+	c9.72,0,15.656,2.722,18.507,4.03l12.487,5.723l13.65-28.92l-8.949-4.211c-5.919-2.783-12.303-4.703-19.312-5.792V36.5h-36.67
+	v18.115C15.652,59.938,4.165,72.33,4.165,87.415c0,23.694,28.043,32.519,39.887,36.248c14.397,4.683,14.397,7.824,14.397,9.511
+	c0,4.059-5.899,5.5-10.953,5.5c-7.394,0-15.357-1.898-21.305-5.083l-13.076-6.999L0,155.982l7.552,4.332
+	c6.384,3.659,15.269,6.403,24.73,7.771v16.787h36.867V166.3C87.965,160.813,100,147.855,100,132.079
+	C99.997,109.313,78.359,99.6,62.146,94.294z"/>
+</svg>

+ 60 - 53
views/createOrEditPedido.html

@@ -1,66 +1,73 @@
+<h4>{{::titulo}}</h4>
 <div class="row">
-	<div class="col-md-12">
+	<div class="col-md-6">
 		<label>
-			<h3>Pedido {{userdata.nombre}} {{userdata.apellido}} - {{fecha | date: 'dd/MM/yyyy'}}</h3>
+			<h4><object data="./images/user.svg" type="image/svg+xml" class="user-icon"></object>{{::userdata.nombre}} {{::userdata.apellido}}</h4>
+			<h4><object data="./images/calendar.svg" type="image/svg+xml" class="user-icon"></object>{{::fecha | date: 'dd/MM/yy'}}</h4>
 		</label>
 	</div>
-</div>
-<div class="row">
 	<div class="col-md-6">
-		<label class="col-md-12">
-			Filtro:
-			<input type="text" class="form-control form-control-small" ng-model="filtro" style="display:block">
+		<label>
+			
 		</label>
 	</div>
 </div>
-
-<div class="col-md-6 col-sm-12 col-xs-12">
-	<table class="table table-striped">
-		<tr>
-			<th>Cantidad</th>
-			<th>ID</th>
-			<th>Nombre</th>
-			<th>Precio</th>
-			<th>Total</th>
-		</tr>
-		<tr ng-repeat="p in listaproductos | filter: filtro | filter:filterCero(criteria) track by p.id" ng-class="{'no-disponible': false&&p.disponible==0}">
-			<td>
-				<input ng-keydown="validateKeypress($event)" ng-change="updateTotal(this)" type="number" onclick="this.select();" class="form-control" ng-model="p.cantidad" value="0" min="0" max="100" max-length="2" step="1"
-					ng-disabled="!cero || (p.disponible==0 && false)"
-					style='width:70px;text-align:center;'>
-			</td>
-			<td>{{p.id}}</td>
-			<td>
-				{{p.nombre}}
-				<div class="low" ng-if="false && p.disponible==0">Este producto no est&aacute; en stock</div>
-				<div class="low" ng-if="false && p.low==1 && p.disponible==1">Este producto tiene bajo stock, confirmar el pedido</div>
-			</td>
-			<td>${{p.precio}}</td>
-			<td>${{p.cantidad*p.precio}}</td>
-		</tr>
-	</table>
-</div>
-<div class="col-md-6 col-sm-12 col-xs-12">
-	<div class="row">
-		<div class="col-md-12">
-			<b>Total sin descuento:</b>
-			${{total}}
+<div class="row">
+	<div class="col-md-6 col-sm-12 col-xs-12">
+		<h4>Tabla de productos</h4>
+		<div class="input-group">
+			<div class="input-group-addon">Filtrar</div>
+			<input type="text" class="form-control form-control-small" ng-model="filtro" style="display:block">
 		</div>
+		<table class="table table-striped">
+			<tr>
+				<th>Cantidad</th>
+				<th>ID</th>
+				<th>Nombre</th>
+				<th>Precio</th>
+				<th>Total</th>
+			</tr>
+			<tr ng-repeat="p in listaproductos | filter: filtro | filter:filterCero(criteria) track by p.id" ng-class="{'no-disponible': false&&p.disponible==0}">
+				<td>
+					<input ng-keydown="validateKeypress($event)" ng-change="updateTotal(this)" type="number" onclick="this.select();" class="form-control" ng-model="p.cantidad" value="0" min="0" max="100" max-length="2" step="1"
+						ng-disabled="!cero || (p.disponible==0 && false)"
+						style='width:70px;text-align:center;'>
+				</td>
+				<td>{{p.id}}</td>
+				<td>
+					{{p.nombre}}
+					<div class="low" ng-if="false && p.disponible==0">Este producto no est&aacute; en stock</div>
+					<div class="low" ng-if="false && p.low==1 && p.disponible==1">Este producto tiene bajo stock, confirmar el pedido</div>
+				</td>
+				<td>${{p.precio}}</td>
+				<td>${{p.cantidad*p.precio}}</td>
+			</tr>
+		</table>
 	</div>
-	<div class="row">
-		<div class="col-md-12">
-			<label>Observaciones:</label>
-			<textarea class="form-control" ng-model="observaciones" multiline="true" maxlength="80" style="max-width:100%;max-height:200px;"> </textarea>
+	<div class="col-md-6 col-sm-12 col-xs-12">
+		<div class="row">
+			<div class="col-md-12">
+				<h4>
+					<object data="./images/total.svg" type="image/svg+xml" class="user-icon"></object>Total Facturado: ${{total}}
+					<small>(Descuentos no aplicados)</small>
+				</h4>
+			</div>
 		</div>
-	</div>
-	<div class="row">
-		<div class="col-md-12">
-			<button ng-show="cero==true" class="css-button" ng-click="confirmar()">Confirmar</button>
-			<button ng-show="cero==false" class="css-button" ng-click="modificar()">Modificar</button>
-			<!--
-			<button class="css-button" ng-click="">Ver pedido</button>
-			-->
-			<button ng-show="cero==false" class="css-button" ng-click="ok()">Guardar Pedido</button>
+		<div class="row">
+			<div class="col-md-12">
+				<label>Observaciones:</label>
+				<textarea class="form-control" ng-model="observaciones" multiline="true" maxlength="80" style="resize:vertical; min-height: 40px;"> </textarea>
+			</div>
+		</div>
+		<div class="row" style="margin-top:10px;">
+			<div class="col-md-12">
+				<button ng-show="cero==true" class="css-button" ng-click="confirmar()">Confirmar</button>
+				<button ng-show="cero==false" class="css-button" ng-click="modificar()">Modificar</button>
+				<!--
+				<button class="css-button" ng-click="">Ver pedido</button>
+				-->
+				<button ng-show="cero==false" class="css-button" ng-click="ok()">Guardar Pedido</button>
+			</div>
 		</div>
 	</div>
-</div>
+</div>