Stock management page #7631

Closed
wants to merge 184 commits into
from

Conversation

Projects
None yet
9 participants
@nihco2
Contributor

nihco2 commented Mar 3, 2017

Questions Answers
Branch? develop
Description? Add stock management page
Type? new feature
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? (optional)
How to test? Refers to prestaforge FF board

TODO:

  • Script to update ps_tab_lang
@@ -0,0 +1,44 @@
+<?php
+/**
+ * 2007-2016 PrestaShop

This comment has been minimized.

@aleeks

aleeks Mar 3, 2017

Contributor

No more 2016 please !!!

@aleeks

aleeks Mar 3, 2017

Contributor

No more 2016 please !!!

This comment has been minimized.

@nihco2

nihco2 Mar 4, 2017

Contributor

yes !

@nihco2

nihco2 Mar 4, 2017

Contributor

yes !

@@ -0,0 +1,11 @@
+<template>

This comment has been minimized.

@kpodemski

kpodemski Mar 7, 2017

Contributor

HELL YEAH! 👍 Vue in PrestaShop :D

@kpodemski

kpodemski Mar 7, 2017

Contributor

HELL YEAH! 👍 Vue in PrestaShop :D

@nihco2 nihco2 added the wip label Mar 7, 2017

@nihco2 nihco2 referenced this pull request Mar 9, 2017

Closed

Upgrade to webpack 2 #7640

@@ -0,0 +1,8 @@
+<template>
+ <select class="form-control m-b-3 search-filter">
+ <option selected>Open this select menu</option>

This comment has been minimized.

@aleeks

aleeks Mar 13, 2017

Contributor

Yooooooooooo!
Where do the translations will come from ?!!

@aleeks

aleeks Mar 13, 2017

Contributor

Yooooooooooo!
Where do the translations will come from ?!!

This comment has been minimized.

@xBorderie

xBorderie Mar 13, 2017

Contributor

?!!... :p

@xBorderie

xBorderie Mar 13, 2017

Contributor

?!!... :p

This comment has been minimized.

@aleeks

aleeks Mar 13, 2017

Contributor

😸

@aleeks

aleeks Mar 13, 2017

Contributor

😸

This comment has been minimized.

@nihco2

nihco2 Mar 14, 2017

Contributor

@aleeks We will do that in the next step, probably with a json generated on server side. ping @Shudrum @thierrymarianne

@nihco2

nihco2 Mar 14, 2017

Contributor

@aleeks We will do that in the next step, probably with a json generated on server side. ping @Shudrum @thierrymarianne

@nihco2 nihco2 changed the title from Prepare stock management page layout to Stock management page Mar 14, 2017

install-dev/upgrade/sql/1.7.2.0.sql
@@ -0,0 +1,3 @@
+
+ALTER TABLE `PREFIX_stock_available` ADD `physical_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`;
+ALTER TABLE `PREFIX_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`;

This comment has been minimized.

@aleeks

aleeks Mar 16, 2017

Contributor

@thierrymarianne
I think you have to add an entry for AdminStockManagement tab! (like your xml/tab.xml)

@aleeks

aleeks Mar 16, 2017

Contributor

@thierrymarianne
I think you have to add an entry for AdminStockManagement tab! (like your xml/tab.xml)

install-dev/upgrade/sql/1.7.2.0.sql
@@ -0,0 +1,3 @@
+
+ALTER TABLE `PREFIX_stock_available` ADD `physical_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`;
+ALTER TABLE `PREFIX_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `quantity`;

This comment has been minimized.

@aleeks

aleeks Mar 16, 2017

Contributor

@thierrymarianne After reserved_quantity (to be equal with db_structure) ?

@aleeks

aleeks Mar 16, 2017

Contributor

@thierrymarianne After reserved_quantity (to be equal with db_structure) ?

robots.txt
+Disallow: /order
+Disallow: /search
+Disallow: /guest-tracking
+Disallow: /order-confirmation

This comment has been minimized.

@aleeks

aleeks Mar 16, 2017

Contributor

Maybe disappear after a rebase!

@aleeks

aleeks Mar 16, 2017

Contributor

Maybe disappear after a rebase!

+</template>
+
+<style lang="sass?outputStyle=expanded" scoped>
+ @import "~PrestaKit/scss/custom/_variables.scss";

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

if you use "scoped", import the variables on the Main app/component: you are duplicating the file in a unique generated id.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

if you use "scoped", import the variables on the Main app/component: you are duplicating the file in a unique generated id.

This comment has been minimized.

@nihco2

nihco2 Apr 4, 2017

Contributor

Hey @mickaelandrieu, thx for your review

@nihco2

nihco2 Apr 4, 2017

Contributor

Hey @mickaelandrieu, thx for your review

This comment has been minimized.

@nihco2

nihco2 Apr 4, 2017

Contributor

Same problem as vuejs/vue-loader#328
I will try to resolve that with sass loader in webpack

@nihco2

nihco2 Apr 4, 2017

Contributor

Same problem as vuejs/vue-loader#328
I will try to resolve that with sass loader in webpack

+ let apiEditCombinationsUrl = `${apiRootUrl}/product/${this.product.product_id}/combination/${this.product.combination_id}`;
+ let postUrl = this.product.combination_id ? apiEditCombinationsUrl : apiEditProductsUrl;
+
+ event.preventDefault();

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

you never should do that in Vue, take a look at https://vuejs.org/v2/guide/events.html#Event-Modifiers

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

you never should do that in Vue, take a look at https://vuejs.org/v2/guide/events.html#Event-Modifiers

This comment has been minimized.

@kpodemski

kpodemski Apr 4, 2017

Contributor

@mickaelandrieu oh, i think that you can use it but you also can use it as a shorthand in a element:
<form v-on:submit.prevent="onSubmit"></form>

@kpodemski

kpodemski Apr 4, 2017

Contributor

@mickaelandrieu oh, i think that you can use it but you also can use it as a shorthand in a element:
<form v-on:submit.prevent="onSubmit"></form>

+ keywords: []
+};
+
+// getters are functions

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

if getters are functions, why use "const" operators?

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

if getters are functions, why use "const" operators?

+Vue.use(VueResource);
+
+// initial state
+const state = {

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

the right behavior of state is to never been able to change or be updated? You probably want to use let or var
this works only cause its "babelised" but the right ES6 code will break your application => in fact it works, Javascript creators have created const operators which is not constant: meh :/

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

the right behavior of state is to never been able to change or be updated? You probably want to use let or var
this works only cause its "babelised" but the right ES6 code will break your application => in fact it works, Javascript creators have created const operators which is not constant: meh :/

This comment has been minimized.

@nihco2

nihco2 Apr 4, 2017

Contributor

They use const in Vuex doc, I don't know what is the best practice

@nihco2

nihco2 Apr 4, 2017

Contributor

They use const in Vuex doc, I don't know what is the best practice

This comment has been minimized.

@kpodemski

kpodemski Apr 4, 2017

Contributor

@mickaelandrieu yep, const is not immutable, but it's js you know how it is :D

@kpodemski

kpodemski Apr 4, 2017

Contributor

@mickaelandrieu yep, const is not immutable, but it's js you know how it is :D

admin-dev/themes/new-theme/package.json
- },
- "dependencies": {
- "mobile-detect": "^1.3.5"
+ "vue": "^2.1.10",

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

:'( it's a great victory for PrestaShop back office, thank you to have started this!

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

:'( it's a great victory for PrestaShop back office, thank you to have started this!

This comment has been minimized.

@xBorderie

xBorderie Apr 4, 2017

Contributor

Why the sad face?

@xBorderie

xBorderie Apr 4, 2017

Contributor

Why the sad face?

This comment has been minimized.

@kpodemski

kpodemski Apr 4, 2017

Contributor

@xBorderie it's like: "damn, i left and they started to use cool stuff" :D i hope!

@kpodemski

kpodemski Apr 4, 2017

Contributor

@xBorderie it's like: "damn, i left and they started to use cool stuff" :D i hope!

+
+ public function getThumbnailPath($imageId)
+ {
+ $imageType = 'jpg';

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

should be constants

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

should be constants

This comment has been minimized.

@nihco2

nihco2 Apr 4, 2017

Contributor

ping @aleeks

@nihco2

nihco2 Apr 4, 2017

Contributor

ping @aleeks

+
+ public function hashUpdateJsAction($hash)
+ {
+ $contents = file_get_contents('http://localhost:8080/' . $hash . '.hot-update.js');

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

it's a wip right?

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor

it's a wip right?

This comment has been minimized.

@nihco2

nihco2 Apr 4, 2017

Contributor

yep

@nihco2

nihco2 Apr 4, 2017

Contributor

yep

+ {
+ try {
+ $this->guardAgainstMissingDeltaParameter($request);
+ $delta = (int)$request->request->get('delta');

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor
- $delta = (int)$request->request->get('delta');
+ $delta = $request->request->getInt('delta');
@mickaelandrieu

mickaelandrieu Apr 4, 2017

Contributor
- $delta = (int)$request->request->get('delta');
+ $delta = $request->request->getInt('delta');
@Dh42

This comment has been minimized.

Show comment
Hide comment
Contributor

Dh42 commented Apr 7, 2017

nihco2 and others added some commits Apr 25, 2017

BO: PSTree with or without checkbox
(cherry picked from commit b1b8632a097450869df6042c940bc072dd5941b4)
BO: Fix filters tree in stock page
(cherry picked from commit bd7effa8ce3364db6248f000e9bcf92962a38f9f)
@aleeks

This comment has been minimized.

Show comment
Hide comment
@aleeks

aleeks May 15, 2017

Contributor

Hi, translations PR have these commits! #7835 😄

Contributor

aleeks commented May 15, 2017

Hi, translations PR have these commits! #7835 😄

@aleeks aleeks closed this May 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment