Did a little bit of change

chap2
Jason Zhu 2022-04-21 00:48:24 +10:00
parent 708353b7f8
commit fe598fc132
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
"use strict";
var vm = (function () { var vm = (function () {
"use strict";
var visibleCatalog = ko.observable(true);
var visibleCart = ko.observable(false);
var catalog = ko.observableArray([ var catalog = ko.observableArray([
Product(1, "T-Shirt", 10.0, 20), Product(1, "T-Shirt", 10.0, 20),
Product(2, "Trousers", 20.0, 10), Product(2, "Trousers", 20.0, 10),
@ -25,6 +29,8 @@ var vm = (function () {
); );
catalog.push(product); catalog.push(product);
clearNewProduct(); clearNewProduct();
$('#addToCatalogModal').modal('hide');
}; };
var searchTerm = ko.observable(""); var searchTerm = ko.observable("");
@ -116,8 +122,6 @@ var vm = (function () {
$("#finishOrderModal").modal("show"); $("#finishOrderModal").modal("show");
}; };
var visibleCatalog = ko.observable(true);
var visibleCart = ko.observable(false);
return { return {
// first chapter // first chapter