-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish Orders for Admin and Customers (#6)
- Loading branch information
Showing
32 changed files
with
4,490 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import CartSession from "./hooks/cartSession"; | ||
// import LoadMoreProducts from "./hooks/loadMoreProducts"; | ||
// import Drag from "./hooks/drag"; | ||
import Drag from "./hooks/drag"; | ||
|
||
let Hooks = { | ||
CartSession: CartSession, | ||
// LoadMoreProducts: LoadMoreProducts, | ||
// Drag: Drag, | ||
Drag: Drag, | ||
}; | ||
|
||
export default Hooks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Sortable from "../../vendor/sortable"; | ||
|
||
const Drag = { | ||
mounted() { | ||
const hook = this; | ||
const selector = "#" + hook.el.id; | ||
const el = document.getElementById(hook.el.id); | ||
|
||
new Sortable(el, { | ||
group: "shared", | ||
draggable: ".draggable", | ||
onEnd: function (evt) { | ||
hook.pushEventTo(selector, "dropped", { | ||
old_status: evt.from.id, | ||
new_status: evt.to.id, | ||
order_id: evt.item.id, | ||
}); | ||
}, | ||
}); | ||
}, | ||
}; | ||
|
||
export default Drag; |
Oops, something went wrong.