Kashoo / kashoo-document-definitions

Kashoo's synctos document definitions
MIT License
2 stars 1 forks source link

CWAP-473: Allow deletion of shoebox items. #41

Closed ziemek closed 6 years ago

ziemek commented 6 years ago

We can delete shoebox items that aren't bank items. I don't think there is a way to enforce that constraint in synctos so this allows deletion of all items, and the ui will enforce that bank items are non-deletable.

dkichler commented 6 years ago

Synctos is in fact capable of enforcing the constraint, and I would argue it's an important enough constraint that it should probably be enforced both here and on the client.

The cannotDelete document validator attribute can be a function that accepts doc and oldDoc parameters, which can be checked for the appropriate type.

ziemek commented 6 years ago

👍👍 will make it so

ziemek commented 6 years ago

Addressed comments, ready for another review.