Commit 5c3e72f2 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

Rename crud variable with name used in backend

parent 8fae48d9
import {Relation2TiersAction} from "@app/core/stores/crud-2-tiers/relation-2-tiers.action";
import {Relation2TiersNamespaceModel} from "@app/core/stores/crud-2-tiers/relation-2-tiers-namespace.model";
import {Relation2TiersAction} from "@app/core/stores/relation-2-tiers/relation-2-tiers.action";
import {Relation2TiersNamespaceModel} from "@app/core/stores/relation-2-tiers/relation-2-tiers-namespace.model";
export class Relation2TiersActionHelper {
static getAllSubResource(crudTwoTiersNameSpace: Relation2TiersNamespaceModel, ...args: ConstructorParameters<typeof Relation2TiersAction.GetAllSubResource>): Relation2TiersAction.GetAllSubResource {
......
import {Relation2TiersNamespaceModel} from "@app/core/stores/crud-2-tiers/relation-2-tiers-namespace.model";
import {Relation2TiersNamespaceModel} from "@app/core/stores/relation-2-tiers/relation-2-tiers-namespace.model";
import {CollectionTypedModel} from "@app/shared/models/collection-typed.model";
import {QueryParametersModel} from "@app/shared/models/query-parameters.model";
......
import {ApiService} from "@app/core/http/api.service";
import {NotificationService} from "@app/core/services/notification.service";
import {Relation2TiersAction} from "@app/core/stores/crud-2-tiers/relation-2-tiers.action";
import {Relation2TiersNamespaceModel} from "@app/core/stores/crud-2-tiers/relation-2-tiers-namespace.model";
import {Relation2TiersAction} from "@app/core/stores/relation-2-tiers/relation-2-tiers.action";
import {Relation2TiersNamespaceModel} from "@app/core/stores/relation-2-tiers/relation-2-tiers-namespace.model";
import {Relation2TiersActionHelper} from "@app/core/helpers/relation-2-tiers-action.helper";
import {StoreUtil} from "@app/core/utils/stores/store.util";
import {BaseResourceState} from "@app/core/models/stores/base-resource.state";
......@@ -58,7 +58,7 @@ export abstract class Relation2TiersState<T> {
return this.urlResource + urlSeparator + parentId + urlSeparator + this.subResource;
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.GetAllSubResource)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.GetAllSubResource)
getAll<U>(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.GetAllSubResource): Observable<CollectionTypedModel<U>> {
const queryParameters = StoreUtil.getQueryParametersToApply(action.queryParameters, ctx);
const url = this.evaluateSubResourceUrl(action.parentId);
......@@ -74,7 +74,7 @@ export abstract class Relation2TiersState<T> {
);
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.GetAllSubResourceSuccess)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.GetAllSubResourceSuccess)
getAllSuccess(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.GetAllSubResourceSuccess<T>): void {
ctx.patchState({
selected: action.list._data,
......@@ -82,14 +82,14 @@ export abstract class Relation2TiersState<T> {
});
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.GetAllSubResourceFail)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.GetAllSubResourceFail)
getAllFail(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.GetAllSubResourceFail): void {
ctx.patchState({
isLoading: false,
});
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.CreateSubResource)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.CreateSubResource)
create(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.CreateSubResource): Observable<string[]> {
if (action.listResId.length === 0) {
return;
......@@ -107,7 +107,7 @@ export abstract class Relation2TiersState<T> {
);
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.DeleteSubResource)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.DeleteSubResource)
delete(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.DeleteSubResource): Observable<string[]> {
if (action.listResId.length === 0) {
return;
......@@ -125,14 +125,14 @@ export abstract class Relation2TiersState<T> {
);
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.UpdateSubResource)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.UpdateSubResource)
update(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.UpdateSubResource): void {
const subResourceUpdate: SubResourceUpdateModel = this.determineSubResourceChange(action.oldResId, action.newResId);
const createAndUpdateActions = this.computeUpdatesActionsToDispatch(subResourceUpdate, action.parentId);
ctx.dispatch(createAndUpdateActions);
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.UpdateSubResourceSuccess)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.UpdateSubResourceSuccess)
updateSuccess(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.UpdateSubResourceSuccess): void {
ctx.patchState({
isLoading: false,
......@@ -140,7 +140,7 @@ export abstract class Relation2TiersState<T> {
ctx.dispatch(Relation2TiersActionHelper.getAllSubResource(this.crudTwoTiersNameSpace, action.parentId));
}
@RegisterDefaultAction((crudTwoTiersNameSpace: Relation2TiersNamespaceModel) => crudTwoTiersNameSpace.UpdateSubResourceFail)
@RegisterDefaultAction((relation2TiersNameSpace: Relation2TiersNamespaceModel) => relation2TiersNameSpace.UpdateSubResourceFail)
updateFail(ctx: StateContext<Relation2TiersStateModel<T>>, action: Relation2TiersAction.UpdateSubResourceFail): void {
ctx.patchState({
isLoading: false,
......
......@@ -34,7 +34,7 @@ export const defaultResourceStateInitValue: ResourceStateModel<any> = {
export abstract class ResourceState<T> {
protected readonly state: StateEnum;
protected readonly crudNameSpace: ResourceNamespaceModel;
protected readonly resourceNameSpace: ResourceNamespaceModel;
protected readonly urlResource: ResourceApiEnum;
protected constructor(protected apiService: ApiService,
......@@ -42,8 +42,8 @@ export abstract class ResourceState<T> {
protected notificationService: NotificationService) {
this.urlResource = this.defineUrlResource();
this.state = this.defineState();
this.crudNameSpace = this.defineResourceNameSpace();
StoreUtil.initState(ResourceState, this.constructor, this.crudNameSpace);
this.resourceNameSpace = this.defineResourceNameSpace();
StoreUtil.initState(ResourceState, this.constructor, this.resourceNameSpace);
}
abstract defineUrlResource(): ResourceApiEnum;
......@@ -52,15 +52,15 @@ export abstract class ResourceState<T> {
abstract defineResourceNameSpace(): ResourceNamespaceModel;
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.ChangeQueryParameters)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.ChangeQueryParameters)
changeQueryParameters(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.ChangeQueryParameters): void {
ctx.patchState({
queryParameters: action.queryParameters,
});
ctx.dispatch(ResourceActionHelper.getAll(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.getAll(this.resourceNameSpace));
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetAll, {cancelUncompleted: true})
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetAll, {cancelUncompleted: true})
getAll(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetAll): Observable<CollectionTypedModel<T>> {
ctx.patchState({
......@@ -72,16 +72,16 @@ export abstract class ResourceState<T> {
return this.apiService.get<T>(this.urlResource, queryParameters)
.pipe(
tap((collection: CollectionTypedModel<T>) => {
ctx.dispatch(ResourceActionHelper.getAllSuccess<T>(this.crudNameSpace, collection));
ctx.dispatch(ResourceActionHelper.getAllSuccess<T>(this.resourceNameSpace, collection));
}),
catchError(error => {
ctx.dispatch(ResourceActionHelper.getAllFail(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.getAllFail(this.resourceNameSpace));
throw error;
}),
);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetAllSuccess)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetAllSuccess)
getAllSuccess(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetAllSuccess<T>): void {
const queryParameters = StoreUtil.updateQueryParameters(ctx, action.list);
......@@ -93,14 +93,14 @@ export abstract class ResourceState<T> {
});
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetAllFail)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetAllFail)
getAllFail(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetAllFail): void {
ctx.patchState({
isLoading: false,
});
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetById)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetById)
getById(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetById): Observable<T> {
ctx.patchState({
isLoading: true,
......@@ -110,16 +110,16 @@ export abstract class ResourceState<T> {
return this.apiService.getById<T>(this.urlResource, action.id)
.pipe(
tap((model: T) => {
ctx.dispatch(ResourceActionHelper.getByIdSuccess(this.crudNameSpace, model));
ctx.dispatch(ResourceActionHelper.getByIdSuccess(this.resourceNameSpace, model));
}),
catchError(error => {
ctx.dispatch(ResourceActionHelper.getByIdFail(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.getByIdFail(this.resourceNameSpace));
throw error;
}),
);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetByIdSuccess)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetByIdSuccess)
getByIdSuccess(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetByIdSuccess<T>): void {
ctx.patchState({
current: action.model,
......@@ -127,14 +127,14 @@ export abstract class ResourceState<T> {
});
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.GetByIdFail)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.GetByIdFail)
getByIdFail(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.GetByIdFail): void {
ctx.patchState({
isLoading: false,
});
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.Create)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.Create)
create(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.Create<T>): Observable<T> {
ctx.patchState({
isLoading: true,
......@@ -143,16 +143,16 @@ export abstract class ResourceState<T> {
return this.apiService.post<T>(this.urlResource, action.model)
.pipe(
tap(() => {
ctx.dispatch(ResourceActionHelper.createSuccess(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.createSuccess(this.resourceNameSpace));
}),
catchError(error => {
ctx.dispatch(ResourceActionHelper.createFail(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.createFail(this.resourceNameSpace));
throw error;
}),
);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.CreateSuccess)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.CreateSuccess)
createSuccess(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.CreateSuccess): void {
ctx.patchState({
isLoading: false,
......@@ -163,14 +163,14 @@ export abstract class ResourceState<T> {
this.notificationService.showSuccess(TRANSLATE("notification.crud.create"), true);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.CreateFail)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.CreateFail)
createFail(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.CreateFail): void {
ctx.patchState({
isLoading: false,
});
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.Update)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.Update)
update(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.Update<T>): Observable<T> {
ctx.patchState({
isLoading: true,
......@@ -179,16 +179,16 @@ export abstract class ResourceState<T> {
return this.apiService.patchById<T>(this.urlResource, action.model[ModelAttributeEnum.resId], action.model)
.pipe(
tap(() => {
ctx.dispatch(ResourceActionHelper.updateSuccess(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.updateSuccess(this.resourceNameSpace));
}),
catchError(error => {
ctx.dispatch(ResourceActionHelper.updateFail(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.updateFail(this.resourceNameSpace));
throw error;
}),
);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.UpdateSuccess)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.UpdateSuccess)
updateSuccess(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.UpdateSuccess): void {
ctx.patchState({
isLoading: false,
......@@ -199,7 +199,7 @@ export abstract class ResourceState<T> {
this.notificationService.showSuccess(TRANSLATE("notification.crud.update"), true);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.UpdateFail)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.UpdateFail)
updateFail(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.UpdateFail): void {
ctx.patchState({
isLoading: false,
......@@ -215,16 +215,16 @@ export abstract class ResourceState<T> {
return this.apiService.deleteById<T>(this.urlResource, action.resId)
.pipe(
tap(() => {
ctx.dispatch(ResourceActionHelper.deleteSuccess(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.deleteSuccess(this.resourceNameSpace));
}),
catchError(error => {
ctx.dispatch(ResourceActionHelper.deleteFail(this.crudNameSpace));
ctx.dispatch(ResourceActionHelper.deleteFail(this.resourceNameSpace));
throw error;
}),
);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.DeleteSuccess)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.DeleteSuccess)
deleteSuccess(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.DeleteSuccess): void {
ctx.patchState({
isLoading: false,
......@@ -235,7 +235,7 @@ export abstract class ResourceState<T> {
this.notificationService.showSuccess(TRANSLATE("notification.crud.delete"), true);
}
@RegisterDefaultAction((crudNameSpace: ResourceNamespaceModel) => crudNameSpace.DeleteFail)
@RegisterDefaultAction((resourceNameSpace: ResourceNamespaceModel) => resourceNameSpace.DeleteFail)
deleteFail(ctx: StateContext<ResourceStateModel<T>>, action: ResourceAction.DeleteFail): void {
ctx.patchState({
isLoading: false,
......
......@@ -2,85 +2,85 @@ import {DepositDataFileModel} from "@app/deposit/models/deposit-data-file.model"
import {DepositsModel} from "@app/generated-api";
import {ResourceAction} from "@app/core/stores/resource/resource.action";
import {ResourceNamespaceModel} from "@app/core/stores/resource/resource-namespace.model";
import {TypeCrudAction} from "@app/shared/decorators/type-crud-action.decorator";
import {TypeDefaultAction} from "@app/shared/decorators/type-default-action.decorator";
import {StateEnum} from "@app/shared/enums/state.enum";
const state = StateEnum.deposit;
export namespace DepositAction {
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResource extends ResourceAction.LoadResource {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceSuccess extends ResourceAction.LoadResourceSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceFail extends ResourceAction.LoadResourceFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class ChangeQueryParameters extends ResourceAction.ChangeQueryParameters {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAll extends ResourceAction.GetAll {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAllSuccess extends ResourceAction.GetAllSuccess<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAllFail extends ResourceAction.GetAllFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetById extends ResourceAction.GetById {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetByIdSuccess extends ResourceAction.GetByIdSuccess<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetByIdFail extends ResourceAction.GetByIdFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Create extends ResourceAction.Create<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class CreateSuccess extends ResourceAction.CreateSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class CreateFail extends ResourceAction.CreateFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Update extends ResourceAction.Update<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class UpdateSuccess extends ResourceAction.UpdateSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class UpdateFail extends ResourceAction.UpdateFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Delete extends ResourceAction.Delete {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class DeleteSuccess extends ResourceAction.DeleteSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class DeleteFail extends ResourceAction.DeleteFail {
}
......
......@@ -6,7 +6,7 @@ import {DepositAction, depositActionNameSpace} from "@app/deposit/stores/deposit
import {DepositDataFileModel} from "@app/deposit/models/deposit-data-file.model";
import {UploadFileStatusModel} from "@app/deposit/models/upload-file-status.model";
import {DepositsModel} from "@app/generated-api";
import {Relation2TiersAction} from "@app/core/stores/crud-2-tiers/relation-2-tiers.action";
import {Relation2TiersAction} from "@app/core/stores/relation-2-tiers/relation-2-tiers.action";
import {ResourceNamespaceModel} from "@app/core/stores/resource/resource-namespace.model";
import {ResourceState, ResourceStateModel, defaultResourceStateInitValue} from "@app/core/stores/resource/resource.state";
import {ApiActionEnum} from "@app/shared/enums/api-action.enum";
......
import {ResourceAction} from "@app/core/stores/resource/resource.action";
import {StateEnum} from "@app/shared/enums/state.enum";
import {StringUtil} from "@app/core/utils/string.util";
import {StateEnum} from "@app/shared/enums/state.enum";
export function TypeCrudAction(state: StateEnum): ClassDecorator {
export function TypeDefaultAction(state: StateEnum): ClassDecorator {
return (target: any) => {
target.type = StringUtil.format(target.type, state);
};
......
import {DepositsModel, LanguagesModel} from "@app/generated-api";
import {ResourceAction} from "@app/core/stores/resource/resource.action";
import {ResourceNamespaceModel} from "@app/core/stores/resource/resource-namespace.model";
import {TypeCrudAction} from "@app/shared/decorators/type-crud-action.decorator";
import {ResourceAction} from "@app/core/stores/resource/resource.action";
import {DepositsModel} from "@app/generated-api";
import {TypeDefaultAction} from "@app/shared/decorators/type-default-action.decorator";
import {StateEnum} from "@app/shared/enums/state.enum";
import {CollectionTypedModel} from "@app/shared/models/collection-typed.model";
import {QueryParametersModel} from "@app/shared/models/query-parameters.model";
import {OrgUnitAction} from "@app/shared/stores/organizational-unit/organizational-unit.action";
import {StringUtil} from "@app/core/utils/string.util";
const state = StateEnum.language;
export namespace LanguageAction {
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResource extends ResourceAction.LoadResource {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceSuccess extends ResourceAction.LoadResourceSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceFail extends ResourceAction.LoadResourceFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class ChangeQueryParameters extends ResourceAction.ChangeQueryParameters {
}
@TypeCrudAction(state)
export class GetAll extends ResourceAction.GetAll {}
@TypeDefaultAction(state)
export class GetAll extends ResourceAction.GetAll {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAllSuccess extends ResourceAction.GetAllSuccess<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAllFail extends ResourceAction.GetAllFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetById extends ResourceAction.GetById {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetByIdSuccess extends ResourceAction.GetByIdSuccess<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetByIdFail extends ResourceAction.GetByIdFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Create extends ResourceAction.Create<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class CreateSuccess extends ResourceAction.CreateSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class CreateFail extends ResourceAction.CreateFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Update extends ResourceAction.Update<DepositsModel> {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class UpdateSuccess extends ResourceAction.UpdateSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class UpdateFail extends ResourceAction.UpdateFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class Delete extends ResourceAction.Delete {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class DeleteSuccess extends ResourceAction.DeleteSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class DeleteFail extends ResourceAction.DeleteFail {
}
}
......
import {DepositsModel} from "@app/generated-api";
import {ResourceAction} from "@app/core/stores/resource/resource.action";
import {ResourceNamespaceModel} from "@app/core/stores/resource/resource-namespace.model";
import {TypeCrudAction} from "@app/shared/decorators/type-crud-action.decorator";
import {TypeDefaultAction} from "@app/shared/decorators/type-default-action.decorator";
import {StateEnum} from "@app/shared/enums/state.enum";
const state = StateEnum.license;
export namespace LicenseAction {
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResource extends ResourceAction.LoadResource {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceSuccess extends ResourceAction.LoadResourceSuccess {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class LoadResourceFail extends ResourceAction.LoadResourceFail {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class ChangeQueryParameters extends ResourceAction.ChangeQueryParameters {
}
@TypeCrudAction(state)
@TypeDefaultAction(state)
export class GetAll extends ResourceAction.GetAll {
}
@TypeCrudAction(state)