This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -141,8 +141,24 @@ namespace AyaNova.Api.Controllers
|
||||
case AyaType.WorkOrderItemTravel:
|
||||
case AyaType.WorkOrderItemOutsideService:
|
||||
case AyaType.WorkOrderItemUnit:
|
||||
AyaTypeId TypeId = new AyaTypeId(AyaType.WorkOrder, (await WorkOrderBiz.GetWorkOrderIdFromRelativeAsync(ayaType, id, ct)).WorkOrderId);
|
||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||
{
|
||||
AyaTypeId TypeId = new AyaTypeId(AyaType.WorkOrder, (await WorkOrderBiz.GetWorkOrderIdFromRelativeAsync(ayaType, id, ct)).ParentId);
|
||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||
}
|
||||
case AyaType.QuoteItem:
|
||||
case AyaType.QuoteItemExpense:
|
||||
case AyaType.QuoteItemLabor:
|
||||
case AyaType.QuoteItemLoan:
|
||||
case AyaType.QuoteItemPart:
|
||||
case AyaType.QuoteItemScheduledUser:
|
||||
case AyaType.QuoteItemTask:
|
||||
case AyaType.QuoteItemTravel:
|
||||
case AyaType.QuoteItemOutsideService:
|
||||
case AyaType.QuoteItemUnit:
|
||||
{
|
||||
AyaTypeId TypeId = new AyaTypeId(AyaType.Quote, (await QuoteBiz.GetQuoteIdFromRelativeAsync(ayaType, id, ct)).ParentId);
|
||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||
}
|
||||
default:
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
||||
|
||||
|
||||
@@ -38,11 +38,7 @@ namespace AyaNova.Api.Controllers
|
||||
serverState = apiServerState;
|
||||
}
|
||||
|
||||
//todo: finish this off, it's missing some shit, and also check it's modernized
|
||||
//will also likely need a seperate fetch route for just the header and just an item
|
||||
//prefer named routes for each rather than some kind of parameter for existing routes, i.e. get{id} for whole graph and get headeronly/{id}
|
||||
|
||||
//STATES OUTSIDE SERVICE
|
||||
|
||||
|
||||
/*
|
||||
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗
|
||||
|
||||
Reference in New Issue
Block a user