githubbob42 / mingle2github2

0 stars 1 forks source link

Editable grid needs to honor pricebook locking rules #1200

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 1385 Transcribing pull request notes from here: https://github.com/Liquidframeworks/alpine-mobile/pull/101

The diff looks extensive only because I renamed a lot of variables while working through the code to make sense of it (everything in the binding contexts are called 'metadata' and they're all different objects!). I decided to keep these changes since it made the code easier to follow.

The initial approach I did with the help of Craig extended the inheritance chain to incorporate TicketItemRow from DetailListItem to make sure each row had it's own copy of the field metadata. The code eventually worked, but broke the normal detail form in the process. It also inadvertently applied ticket item validations to any type of list item.

After going in circles for a while, I realized that I couldn't really fix this the 'proper' way without rewriting a large portion of forms and the display/editor bindings to honor the "editability" of a field independent of the layout. I'm not about to do that so close to a release...

So, yeah, it's not an ideal solution but it's the cheaper option (both risk and memory-wise) to just clone the layout metadata for each row (instead of cloning the field metadata for each row).

githubbob42 commented 5 years ago

Story: #1160 Fast ticket item editing (Mingle)