Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-759: Deactivate Order Readonly Mode #412

Merged
merged 7 commits into from
Mar 27, 2024
Merged

VCST-759: Deactivate Order Readonly Mode #412

merged 7 commits into from
Mar 27, 2024

Conversation

OlegoO
Copy link
Contributor

@OlegoO OlegoO commented Mar 21, 2024

Description

feat: Extend OrderOperation registration with isLocked function to check readonly/locked mode
feat: Add knownOperations.isLocked(type, entity) for checking readonly/locked mode of an entity
feat: Admin UI now supports customization of Readonly/Locked Mode for order operations. Operation extended with isLocked(entity) function for defining custom readonly rules.

Operation Registation

knownOperations.registerOperation({
                    type: 'CustomerOrder',
                    treeTemplateUrl: 'orderOperationDefault.tpl.html',
                    isLocked: function (entity) {
                        return entity.status === 'Completed' ||
                            entity.cancelledState === 'Completed' ||
                            entity.isCancelled;
                    },
                    detailBlade: {
                        id: 'orderDetail',
                        template: 'Modules/$(VirtoCommerce.Orders)/Scripts/blades/customerOrder-detail.tpl.html',
                        knownChildrenOperations: ['Shipment', 'PaymentIn'],
                        metaFields: [
...

Extension Samples - Deactivate Readonly

var orderOperation = knownOperations.getOperation('CustomerOrder');

// Override Readonly/Locked default logic for CustomerOrder
orderOperation.isLocked = function () {
                        return false;
                    };

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-759

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Orders_3.811.0-pr-412-bf05.zip

OlegoO and others added 5 commits March 21, 2024 12:45
feat: Admin UI supports customization of Readonly/Locked Mode for order operations. Operation was exteded with isLocked: function (entity) that allows to define rules for Readonly.
feat: Added knownOperations.isLocked(type, entity)
@CLAassistant
Copy link

CLAassistant commented Mar 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@OlegoO OlegoO merged commit d146578 into dev Mar 27, 2024
5 of 7 checks passed
@OlegoO OlegoO deleted the feat/VCST-759 branch March 27, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants