Prestashop: Migrate "Advanced Parameters > Team > Employees" page

Created on 19 Sep 2018  路  15Comments  路  Source: PrestaShop/PrestaShop

Type : page
Status : in-progress
Part of Symfony migration project

Todo:

  • [x] Migrate "Employees" listing (grid) #10797
  • [x] Migrate "Employees option" configuration form #10790
  • [x] Migrate "Employees" actions #11135
  • [ ] Specific rules for SuperAdmin: see below
  • [x] Add Helper Card https://github.com/PrestaShop/PrestaShop/pull/11049

Superadmin specific rule: https://github.com/PrestaShop/PrestaShop/pull/10797#issuecomment-426934279
Same issue applies to https://github.com/PrestaShop/PrestaShop/issues/10505

Helper card: https://github.com/PrestaShop/PrestaShop/issues/10502#issuecomment-427389934

Page hidden can be accessed through /admin-dev/index.php/configure/advanced/employees

migration

Most helpful comment

@colinegin I started using github Tasks Lists to be sure we do not forget to do things on a page
as we now make multiple PRs for 1 Issue

See https://github.com/PrestaShop/PrestaShop/issues/10502#issue-361802629 as an example 馃槈

All 15 comments

This page needs to have an Helper Card.
refer to this PR : https://github.com/PrestaShop/PrestaShop/issues/10434

Thanks

@matks Has the helper card been implemented on this page ?

Thanks

@colinegin no, not yet.

@colinegin I started using github Tasks Lists to be sure we do not forget to do things on a page
as we now make multiple PRs for 1 Issue

See https://github.com/PrestaShop/PrestaShop/issues/10502#issue-361802629 as an example 馃槈

The "action" label has been forgotten, can we add it ?

capture d ecran_595

capture d ecran_594

@marionf I think it will be done in https://github.com/PrestaShop/PrestaShop/pull/11135 but we'll make sure it is indeed :)

I think we have an issue with the helper card.
This is how it looks like on develop branch

capture d ecran_864

@marionf Isn't it an issue with the cache ? I tried develop, with and without rebuilding assets, cant' reproduce.
capture d ecran 2019-01-07 a 11 04 02

Yes, my bad :(

No worries 馃憤 happens to everyone 馃槃

@sarjon I see that @rokaszygmantas has used the accessibility_checker feature of the Grid to hide the "Delete" button for SuperAdmin.
https://github.com/PrestaShop/PrestaShop/pull/10783/files#diff-080d0e55f3eef22487ec37d3cd00272fR145

It might need a few rework to work for Bulk Actions, but maybe it can be used for the SuperAdmin rules (see this issue body on the top of the page)

@matks i think we need some improvements in grid presenter itself. Here's how it currently works:

GridPresenter takes data (records, definition, filters & etc.) from Grid and passes it directly to template. In template, there are quite a few checks and unnecessary loops to render different parts of grids in single view.

What I think Presenter should do is build _final_ grid structure. This means that instead of returning different parts of data (records, definition, filters & etc.) it should already return grid prepared for rendering. So instead of resolving what row actions or bulk actions applies to row in template, presenter should do that.

is simple feature but seems hard to explain, either way, do you get the idea?

@sarjon I get the idea 馃槂however we have to be cautious here. Some processings defined in the template are indeed unnecessary. But some other processings might be templating choices that might be implemented differently by a developer building his own Backoffice on top of our backend.

It's the same issue with frontend theme: we have to make a lot of variables available in the Presenter because we want theme developers to be able to pick whatever they need to build multiple themes.

So what about that :

  • we keep a standard GridPresenter that provides all the grid data, like now
  • we build an OptimizedGridPresenter that provides faster rendering because it avoids unnecessary processings

This way people can choose.

Maybe we can implement this in a single class, with options.

@eternoendless @mickaelandrieu your feedback would be great here 馃槃

@matks could you provide some example?

in addition, i think it a good time to address some issues/limitations we have faced when creating grids for 1.7.6, wdyt?

There's also this bug https://github.com/PrestaShop/PrestaShop/issues/10228 related to the page

Maybe it can be solved with superadmin specific rules

Was this page helpful?
0 / 5 - 0 ratings