Skip to content

VCST-2980: Add/delete line item full functionality #1

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

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/module-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ jobs:
if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) ||
(github.event_name == 'workflow_dispatch') || (github.base_ref == 'dev') && (github.event_name == 'pull_request') }}
needs: 'ci'
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.11
uses: VirtoCommerce/.github/.github/workflows/e2e.yml@VCST-2469

with:
katalonRepo: 'VirtoCommerce/vc-quality-gate-katalon'
katalonRepoBranch: 'dev'
testSuite: 'Test Suites/Modules/Platform_collection'
installModules: 'true'
installModules: 'false'
installCustomModule: 'true'
customModuleId: ${{ needs.ci.outputs.moduleId }}
customModuleUrl: ${{ needs.ci.outputs.artifactUrl }}
Expand Down
49 changes: 15 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,27 @@
# OrderManagement
# Virto Commerce Order Management Module

## Overview
[![CI status](https://github.com/VirtoCommerce/vc-module-order-management/workflows/Module%20CI/badge.svg?branch=dev)](https://github.com/VirtoCommerce/vc-module-order-management/actions?query=workflow%3A"Module+CI") [![Quality gate](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-module-order-management&metric=alert_status&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-module-order-management) [![Reliability rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-module-order-management&metric=reliability_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-module-order-management) [![Security rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-module-order-management&metric=security_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-module-order-management) [![Sqale rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-module-order-management&metric=sqale_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-module-order-management)

Short overview of what the new module is.
The “Order Management” module in Virto Commerce is an attempt to split the old [“Order”](https://github.com/VirtoCommerce/vc-module-order) module into two modules where the new module will take over the whole functionality of managing the composition of order products, their prices, quantities, adding new and deleting old items, etc.

- What is the new or updated experience?
## Key features

- Does this module replace an existing module/experience? If yes, what is the transition plan?
Virto Commerce Order Management module supports the following functionalities:

- Does this module has dependency on other ? If yes, list/explain the dependencies.
* Changing Order products (quantity, product change, new products).
* Possibility to change Product items.

- List the key deployment scenarios - why would people use this module?
## Documentation

## Functional Requirements
* [View on GitHub](https://github.com/VirtoCommerce/vc-module-order/)

Short description of the new module functional requirements.
## References

## Scenarios

List of scenarios that the new module implements

1. [Scenario 1](/doc/scenario-name1.md)
1. [Scenario 2](/doc/scenario-name2.md)
1. [Scenario 3](/doc/scenario-name3.md)
1. [Scenario 3.1](/doc/scenario-name31.md)
1. [Scenario 3.2](/doc/scenario-name32.md)
1. [Scenario 4](/doc/scenario-name4.md)

## Web API

Web API documentation for each module is built out automatically and can be accessed by following the link bellow:
<https://link-to-swager-api>

## Database Model

![DB model](./docs/media/diagram-db-model.png)

## Related topics

[Some Article1](some-article1.md)

[Some Article2](some-article2.md)
* [Deployment](https://docs.virtocommerce.org/platform/developer-guide/Tutorials-and-How-tos/Tutorials/deploy-module-from-source-code/)
* [Installation](https://docs.virtocommerce.org/platform/user-guide/modules-installation/)
* [Home](https://virtocommerce.com)
* [Community](https://www.virtocommerce.org)
* [Download latest release](https://github.com/VirtoCommerce/vc-module-order-management/releases/latest)

## License

Expand Down
54 changes: 54 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
site_name: Virto Commerce Documentation
theme:
name: material
language: en
# features:
# - instant # (still experimental) feature fails to load images when folder changes
favicon: media/favicon.ico
logo: media/logo.png
palette:
primary: red
font:
text: Roboto
code: Ubuntu Mono
markdown_extensions:
- admonition # https://squidfunk.github.io/mkdocs-material/extensions/admonition/ (in material theme)
- codehilite
- meta
# https://squidfunk.github.io/mkdocs-material/extensions/pymdown/
- pymdownx.superfences
- pymdownx.magiclink
plugins:
- search # necessary for search to work
# - autolinks
- awesome-pages:
# strict: false
- git-revision-date-localized
# - minify:
# minify_html: true
- redirects:
redirect_maps:
'redir.md': 'index.md'
# - monorepo

# Project information
site_name: Virto Commerce
site_description: Virto Commerce Documentation
site_author: Virto Commerce
site_url: https://virtocommerce.com/docs/latest

# Repository
repo_name: VirtoCommerce/vc-module-order-management
repo_url: https://github.com/VirtoCommerce/vc-module-order-management

# Copyright
copyright: Copyright © 2025 Virto Commerce. All rights reserved.

extra:
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/VirtoCommerce
- icon: fontawesome/brands/twitter
link: https://twitter.com/virtocommerce?lang=en
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/company/virto-commerce/
2 changes: 1 addition & 1 deletion module.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GraphQL.Server.Ui.GraphiQL.dll
GraphQL.SystemTextJson.dll
GraphQLParser.dll
MediatR.dll
MediatR.Extensions.Microsoft.DependencyInjection.dll
MediatR.Contracts.dll
Microsoft.AI.DependencyCollector.dll
Microsoft.AI.EventCounterCollector.dll
Microsoft.AI.PerfCounterCollector.dll
Expand Down
20 changes: 6 additions & 14 deletions src/VirtoCommerce.OrderManagement.Core/ModuleConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public static class Security
{
public static class Permissions
{
public const string Access = "OrderManagement:access";
public const string Create = "OrderManagement:create";
public const string Read = "OrderManagement:read";
public const string Update = "OrderManagement:update";
public const string Delete = "OrderManagement:delete";
public const string Access = "order-management:access";
public const string Create = "order-management:create";
public const string Read = "order-management:read";
public const string Update = "order-management:update";
public const string Delete = "order-management:delete";

public static string[] AllPermissions { get; } =
[
Expand All @@ -30,19 +30,11 @@ public static class Settings
{
public static class General
{
public static SettingDescriptor OrderManagementEnabled { get; } = new()
{
Name = "OrderManagement.Enabled",
GroupName = "OrderManagement|General",
ValueType = SettingValueType.Boolean,
DefaultValue = false,
};

public static IEnumerable<SettingDescriptor> AllGeneralSettings
{
get
{
yield return OrderManagementEnabled;
return [];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.Xapi.Core" Version="3.901.0" />
<PackageReference Include="VirtoCommerce.Xapi.Core" Version="3.904.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.OrderManagement.Core\VirtoCommerce.OrderManagement.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using VirtoCommerce.OrderManagement.Core;

namespace VirtoCommerce.OrderManagement.Web.Controllers.Api
{
[Route("api/order-management")]
public class OrderManagementController : Controller
{
// GET: api/order-management
/// <summary>
/// Get message
/// </summary>
/// <remarks>Return "Hello world!" message</remarks>
[HttpGet]
[Route("")]
[Authorize(ModuleConstants.Security.Permissions.Read)]
public ActionResult<string> Get()
{
return Ok(new { result = "Hello world!" });
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Artikel zur Bestellung hinzufügen"
}
},
"commands": {
"add-selected": "Ausgewählte hinzufügen",
"add-item": "Artikel hinzufügen"
}
},
"permissions": {
"order-management:access": "Bestellmanagement öffnen",
"order-management:create": "Bestelldaten erstellen",
"order-management:read": "Bestellbezogene Daten anzeigen",
"order-management:update": "Bestelldaten aktualisieren",
"order-management:delete": "Bestellverwaltungsdaten löschen"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Add item to order"
}
},
"commands": {
"add-selected": "Add selected",
"add-item": "Add item"
}
},
"permissions": {
"order-management:access": "Open OrderManagement menu",
"order-management:create": "Create OrderManagement related data",
"order-management:read": "View OrderManagement related data",
"order-management:update": "Update OrderManagement related data",
"order-management:delete": "Delete OrderManagement related data"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Añadir artículo al pedido"
}
},
"commands": {
"add-selected": "Añadir seleccionados",
"add-item": "Añadir artículo"
}
},
"permissions": {
"order-management:access": "Abrir menú Gestión de pedidos",
"order-management:create": "Crear datos relacionados con la gestión de pedidos",
"order-management:read": "Ver datos relacionados con OrderManagement",
"order-management:update": "Actualizar datos relacionados con la gestión de pedidos",
"order-management:delete": "Eliminar datos relacionados con OrderManagement"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Ajouter un article à la commande"
}
},
"commands": {
"add-selected": "Ajouter sélection",
"add-item": "Ajouter un article"
}
},
"permissions": {
"order-management:access": "Ouvrir le menu Gestion des commandes",
"order-management:create": "Créer des données liées à la gestion des commandes",
"order-management:read": "Voir les données relatives à la gestion des commandes",
"order-management:update": "Mettre à jour les données liées à la gestion des commandes",
"order-management:delete": "Supprimer les données liées à la gestion des commandes"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Aggiungi articolo all'ordine"
}
},
"commands": {
"add-selected": "Aggiungi selezionati",
"add-item": "Aggiungi articolo"
}
},
"permissions": {
"order-management:access": "Apri il menu Gestione ordini",
"order-management:create": "Crea dati relativi a OrderManagement",
"order-management:read": "Visualizza i dati relativi a OrderManagement",
"order-management:update": "Aggiorna dati relativi a OrderManagement",
"order-management:delete": "Elimina dati relativi a OrderManagement"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "注文に商品を追加"
}
},
"commands": {
"add-selected": "選択を追加",
"add-item": "アイテムを追加"
}
},
"permissions": {
"order-management:access": "注文管理メニューを開く",
"order-management:create": "注文管理関連データを作成",
"order-management:read": "注文管理関連のデータを表示",
"order-management:update": "注文管理関連データを更新",
"order-management:delete": "OrderManagement関連のデータを削除"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"orderManagement": {
"blades": {
"catalog-items-select": {
"title": "Dodaj przedmiot do zamówienia"
}
},
"commands": {
"add-selected": "Dodaj wybrane",
"add-item": "Dodaj przedmiot"
}
},
"permissions": {
"order-management:access": "Otwórz menu Zarządzania Zamówieniami",
"order-management:create": "Utwórz dane związane z OrderManagement",
"order-management:read": "Zobacz dane związane z Zarządzaniem Zamówieniami",
"order-management:update": "Aktualizuj dane związane z Zarządzaniem Zamówieniami",
"order-management:delete": "Usuń dane związane z OrderManagement"
}
}
Loading
Loading