Skip to content

Commit

Permalink
Fix:Qty adding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjusha-tridz committed Jan 16, 2024
1 parent f17e37e commit a11247e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ury_pos/public/urypos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/assets/ury_pos/urypos/URY.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>URY POS</title>
<script type="module" crossorigin src="/assets/ury_pos/urypos/assets/index-e6ebee7c.js"></script>
<script type="module" crossorigin src="/assets/ury_pos/urypos/assets/index-29023b3f.js"></script>
<link rel="stylesheet" href="/assets/ury_pos/urypos/assets/index-5eb6e3fc.css">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion ury_pos/www/urypos.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/assets/ury_pos/urypos/URY.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>URY POS</title>
<script type="module" crossorigin src="/assets/ury_pos/urypos/assets/index-e6ebee7c.js"></script>
<script type="module" crossorigin src="/assets/ury_pos/urypos/assets/index-29023b3f.js"></script>
<link rel="stylesheet" href="/assets/ury_pos/urypos/assets/index-5eb6e3fc.css">
</head>
<body>
Expand Down
15 changes: 10 additions & 5 deletions urypos/src/stores/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,17 @@ export const useMenuStore = defineStore("menu", {

addToCartAndUpdateQty() {
const item = this.item;
if (!item.qty) {
this.$set(item, "qty", this.quantity);
} else {
item.qty = this.quantity;
item.comment = this.itemComments;

// Check if 'qty' is a valid and non-empty value
if (this.quantity !== null && this.quantity !== undefined && this.quantity !== '' && this.quantity !== 0) {
if (!item.qty) {
this.$set(item, "qty", this.quantity);
} else {
item.qty = this.quantity;
item.comment = this.itemComments;
}
}

this.showDialog = false;
},
getitemQty(item) {
Expand Down

0 comments on commit a11247e

Please sign in to comment.