This commit is contained in:
@@ -159,6 +159,20 @@ namespace AyaNova.Api.Controllers
|
|||||||
AyaTypeId TypeId = new AyaTypeId(AyaType.Quote, (await QuoteBiz.GetQuoteIdFromRelativeAsync(ayaType, id, ct)).ParentId);
|
AyaTypeId TypeId = new AyaTypeId(AyaType.Quote, (await QuoteBiz.GetQuoteIdFromRelativeAsync(ayaType, id, ct)).ParentId);
|
||||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||||
}
|
}
|
||||||
|
case AyaType.PMItem:
|
||||||
|
case AyaType.PMItemExpense:
|
||||||
|
case AyaType.PMItemLabor:
|
||||||
|
case AyaType.PMItemLoan:
|
||||||
|
case AyaType.PMItemPart:
|
||||||
|
case AyaType.PMItemScheduledUser:
|
||||||
|
case AyaType.PMItemTask:
|
||||||
|
case AyaType.PMItemTravel:
|
||||||
|
case AyaType.PMItemOutsideService:
|
||||||
|
case AyaType.PMItemUnit:
|
||||||
|
{
|
||||||
|
AyaTypeId TypeId = new AyaTypeId(AyaType.PM, (await PMBiz.GetPMIdFromRelativeAsync(ayaType, id, ct)).ParentId);
|
||||||
|
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user