diff --git a/apps/angular/projects/ordering/src/lib/proxy/generate-proxy.json b/apps/angular/projects/ordering/src/lib/proxy/generate-proxy.json index 9c464296..626d4922 100644 --- a/apps/angular/projects/ordering/src/lib/proxy/generate-proxy.json +++ b/apps/angular/projects/ordering/src/lib/proxy/generate-proxy.json @@ -3,84 +3,6 @@ "ordering" ], "modules": { - "abp": { - "rootPath": "abp", - "remoteServiceName": "abp", - "controllers": { - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { - "controllerName": "AbpApplicationConfiguration", - "controllerGroupName": "AbpApplicationConfiguration", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/abp/application-configuration", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { - "controllerName": "AbpApiDefinition", - "controllerGroupName": "AbpApiDefinition", - "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", - "interfaces": [], - "actions": { - "GetByModel": { - "uniqueName": "GetByModel", - "name": "Get", - "httpMethod": "GET", - "url": "api/abp/api-definition", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "model", - "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "model", - "name": "IncludeTypes", - "jsonName": null, - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "model" - } - ], - "returnValue": { - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" - }, - "allowAnonymous": null, - "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" - } - } - } - } - }, "ordering": { "rootPath": "ordering", "remoteServiceName": "Ordering", @@ -313,8 +235,8 @@ "allowAnonymous": null, "implementFrom": "EShopOnAbp.OrderingService.Orders.IOrderAppService" }, - "SetAsCancelledAsyncByIdAndInput": { - "uniqueName": "SetAsCancelledAsyncByIdAndInput", + "SetAsCancelledAsyncById": { + "uniqueName": "SetAsCancelledAsyncById", "name": "SetAsCancelledAsync", "httpMethod": "POST", "url": "api/ordering/order/{id}/set-as-cancelled", @@ -327,14 +249,6 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null - }, - { - "name": "input", - "typeAsString": "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto, EShopOnAbp.OrderingService.Application.Contracts", - "type": "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto", - "typeSimple": "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto", - "isOptional": false, - "defaultValue": null } ], "parameters": [ @@ -349,18 +263,6 @@ "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto", - "typeSimple": "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" } ], "returnValue": { @@ -447,6 +349,84 @@ } } } + }, + "abp": { + "rootPath": "abp", + "remoteServiceName": "abp", + "controllers": { + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { + "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", + "interfaces": [ + { + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/abp/application-configuration", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + } + }, + "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { + "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", + "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", + "interfaces": [], + "actions": { + "GetByModel": { + "uniqueName": "GetByModel", + "name": "Get", + "httpMethod": "GET", + "url": "api/abp/api-definition", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "model", + "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "model", + "name": "IncludeTypes", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "model" + } + ], + "returnValue": { + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" + } + } + } + } } }, "types": { @@ -2305,29 +2285,6 @@ } ] }, - "EShopOnAbp.OrderingService.Orders.SetAsCancelledDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "PaymentRequestId", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isRequired": false - }, - { - "name": "PaymentRequestStatus", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": false - } - ] - }, "EShopOnAbp.OrderingService.Orders.OrderCreateDto": { "baseType": null, "isEnum": false, diff --git a/apps/angular/projects/ordering/src/lib/proxy/orders/models.ts b/apps/angular/projects/ordering/src/lib/proxy/orders/models.ts index 31c23a05..8abaecce 100644 --- a/apps/angular/projects/ordering/src/lib/proxy/orders/models.ts +++ b/apps/angular/projects/ordering/src/lib/proxy/orders/models.ts @@ -56,8 +56,3 @@ export interface OrderItemDto extends EntityDto { discount: number; units: number; } - -export interface SetAsCancelledDto { - paymentRequestId?: string; - paymentRequestStatus?: string; -} diff --git a/apps/angular/projects/ordering/src/lib/proxy/orders/order.service.ts b/apps/angular/projects/ordering/src/lib/proxy/orders/order.service.ts index 6b4e5b94..efe0ba2a 100644 --- a/apps/angular/projects/ordering/src/lib/proxy/orders/order.service.ts +++ b/apps/angular/projects/ordering/src/lib/proxy/orders/order.service.ts @@ -1,4 +1,4 @@ -import type { GetMyOrdersInput, GetOrdersInput, OrderCreateDto, OrderDto, SetAsCancelledDto } from './models'; +import type { GetMyOrdersInput, GetOrdersInput, OrderCreateDto, OrderDto } from './models'; import { RestService } from '@abp/ng.core'; import type { PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; import { Injectable } from '@angular/core'; @@ -56,11 +56,10 @@ export class OrderService { }, { apiName: this.apiName }); - setAsCancelled = (id: string, input: SetAsCancelledDto) => + setAsCancelled = (id: string) => this.restService.request({ method: 'POST', url: `/api/ordering/order/${id}/set-as-cancelled`, - body: input, }, { apiName: this.apiName }); diff --git a/apps/angular/projects/ordering/src/pages/orders/orders.component.ts b/apps/angular/projects/ordering/src/pages/orders/orders.component.ts index 71bd8c70..680e10a4 100644 --- a/apps/angular/projects/ordering/src/pages/orders/orders.component.ts +++ b/apps/angular/projects/ordering/src/pages/orders/orders.component.ts @@ -75,14 +75,9 @@ export class OrdersComponent implements OnInit { if (status !== Confirmation.Status.confirm) { return; } - this.service - .setAsCancelled(row.id, { - paymentRequestId: undefined, - paymentRequestStatus: undefined, - }) - .subscribe(() => { - this.list.get(); - }); + this.service.setAsCancelled(row.id).subscribe(() => { + this.list.get(); + }); }); } }