Update Master Formularium dan Corporate formularium

This commit is contained in:
2023-09-25 16:21:38 +07:00
parent 72958019f1
commit 738392c143
33 changed files with 2807 additions and 261 deletions

View File

@@ -14,13 +14,28 @@ class CorporateFormulariumResource extends JsonResource
*/
public function toArray($request)
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'items_count' => $this->items_count,
'status' => $this->corporateFormulariums->count() ? 'active' : 'inactive',
'corporate_formulariums' => $this->coporateFormulariums,
'id' => $this->formularium->id,
'code' => $this->formularium->code,
'name' => $this->formularium->name,
'description' => $this->formularium->description,
'manufacturer' => $this->formularium->manufacturer,
'category_name' => $this->formularium->category_name,
'kategori_obat' => $this->formularium->kategori_obat,
'uom' => $this->formularium->uom,
'general_indication' => $this->formularium->general_indication,
'composition' => $this->formularium->composition,
'atc_code' => $this->formularium->atc_code,
'class' => $this->formularium->class,
'bpom_registration' => $this->formularium->bpom_registration,
'classifications' => $this->formularium->classifications,
'cat_for' => $this->formularium->cat_for,
'items_count' => $this->formularium->items_count,
'status' => $this->active ? 'active' : 'inactive',
// 'corporate_formulariums' => $this->formua,
'active' => $this->active == 1 ? 'Active' : 'Inactive',
];
}
}