Skip to content

Commit 68a0cff

Browse files
authored
Merge pull request #586 from crossroads/GCW-2940-clear-weight-pieces-on-new-form
GCW-2940 fix weight and pieces not getting cleared on new form
2 parents 5b2e213 + 78d9fdb commit 68a0cff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/routes/items/new.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default AuthorizeRoute.extend({
7979
this.initializeController();
8080

8181
if (this.get("newItemRequest")) {
82-
this.initializeDimensions();
82+
this.initializeAttributes();
8383
this.manageSubformDetails();
8484
this.setUpPackageImage();
8585
window.localStorage.setItem("isSelectLocationPreviousRoute", false);
@@ -133,7 +133,7 @@ export default AuthorizeRoute.extend({
133133
}
134134
},
135135

136-
initializeDimensions() {
136+
initializeAttributes() {
137137
const controller = this.controller;
138138
this.set("newItemRequest", false);
139139
controller.set("quantity", 1);
@@ -144,6 +144,8 @@ export default AuthorizeRoute.extend({
144144
controller.set("length", null);
145145
controller.set("width", null);
146146
controller.set("height", null);
147+
controller.set("weight", null);
148+
controller.set("pieces", null);
147149
controller.set("selectedGrade", {
148150
name: "B",
149151
id: "B"

0 commit comments

Comments
 (0)