Ready to deploy

This commit is contained in:
2016-09-19 12:01:08 -04:00
parent d242fea781
commit 3a4fd9f2f2
5 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ namespace InventoryTraker.Web
{ {
public static void Initialize() public static void Initialize()
{ {
Database.SetInitializer(new DropCreateDatabaseAlways<AppDbContext>()); Database.SetInitializer(new CreateDatabaseIfNotExists<AppDbContext>());
} }
} }
} }
+2 -2
View File
@@ -52,9 +52,9 @@ namespace InventoryTraker.Web
context.SaveChanges(); context.SaveChanges();
AddInventory(context); //AddInventory(context);
context.SaveChanges(); //context.SaveChanges();
} }
} }
} }
@@ -87,6 +87,9 @@ namespace InventoryTraker.Web.Controllers
if (!ModelState.IsValid) if (!ModelState.IsValid)
return GetModelStateErrorListJson(); return GetModelStateErrorListJson();
if (form.InventoryQuantities == null || !form.InventoryQuantities.Any())
return GetErrorListJson("Must add at least one item");
var errors = new List<string>(); var errors = new List<string>();
foreach (var quantityForm in form.InventoryQuantities) foreach (var quantityForm in form.InventoryQuantities)
+2 -2
View File
@@ -16,8 +16,8 @@
for information on customizing logging rules and outputs. for information on customizing logging rules and outputs.
--> -->
<targets> <targets>
<target name="debugLogger" xsi:type="File" fileName="${basedir}/Logs/Debug.${shortdate}.txt" /> <target name="debugLogger" xsi:type="File" fileName="${basedir}/../logs/Debug.${shortdate}.txt" />
<target name="exceptionLogger" xsi:type="File" fileName="${basedir}/Logs/Error.${shortdate}.txt" /> <target name="exceptionLogger" xsi:type="File" fileName="${basedir}/../logs/Error.${shortdate}.txt" />
</targets> </targets>
<rules> <rules>
<logger name="*" minlevel="Debug" writeTo="debugLogger" /> <logger name="*" minlevel="Debug" writeTo="debugLogger" />
@@ -37,7 +37,10 @@
</thead> </thead>
<tbody ng-hide="vm.loadingTransactions"> <tbody ng-hide="vm.loadingTransactions">
<tr ng-repeat-start="transaction in vm.transactions | orderBy:['-transactionDate', 'currentQuantity']"> <tr ng-repeat-start="transaction in vm.transactions | orderBy:['-transactionDate', 'currentQuantity']">
<td>{{transaction.transactionType}}</td> <td>
{{transaction.transactionType}}
<span ng-show="transaction.destination"><i class="fa fa-map-marker" title="{{transaction.destination}}"></i></span>
</td>
<td>{{transaction.memo}}</td> <td>{{transaction.memo}}</td>
<td>{{transaction.transactionDate | date:'shortDate'}}</td> <td>{{transaction.transactionDate | date:'shortDate'}}</td>
<td>{{transaction.addedQuantity}}</td> <td>{{transaction.addedQuantity}}</td>