Skip to content

Commit

Permalink
Customer website
Browse files Browse the repository at this point in the history
  • Loading branch information
itzArtha committed Oct 6, 2023
1 parent 06cda21 commit 3bcc6c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/Http/Resources/Catalogue/BasketResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function toArray($request): array
'code' => $department->code,
'name' => $department->name,
'state' => $department->state,
'interest' => $department->interest,
'description' => $department->description,
'created_at' => $department->created_at,
'updated_at' => $department->updated_at,
Expand Down
1 change: 1 addition & 0 deletions app/Http/Resources/Catalogue/DepartmentResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function toArray($request): array
'code' => $this->code,
'name' => $this->name,
'state' => $this->state,
'interest' => $this->interest,
'description' => $this->description,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
Expand Down
1 change: 1 addition & 0 deletions app/Models/Catalogue/ProductCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property string|null $parent_type
* @property string $code
* @property string|null $name
* @property string|null $interest
* @property string|null $description
* @property ProductCategoryTypeEnum $type
* @property bool $is_family
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const handleRadioChanged = async (itemId: number, itemValue: string, itemSlug: s
await axios.patch(
route('org.models.product-category.update', itemSlug),
{
state: itemValue
interest: itemValue
}
).then(data => {
console.log(data)
Expand Down Expand Up @@ -55,15 +55,15 @@ const handleRadioChanged = async (itemId: number, itemValue: string, itemSlug: s
</div>
</td>
<td class="whitespace-nowrap px-3 text-sm text-gray-500 text-center">
<input v-model="item.state" value="interested" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.state, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm Interested in ${item.name}.`"
<input v-model="item.state" value="interested" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.interest, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm Interested in ${item.name}.`"
class="h-6 w-6 rounded cursor-pointer border-gray-300 hover:border-lime-500 text-lime-500 focus:ring-lime-600" />
</td>
<td class="whitespace-nowrap px-3 text-sm text-gray-500 text-center">
<input v-model="item.state" value="not_interested" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.state, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm not interested in ${item.name}.`"
<input v-model="item.state" value="not_interested" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.interest, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm not interested in ${item.name}.`"
class="h-6 w-6 rounded cursor-pointer border-gray-300 hover:border-rose-500 text-rose-500 focus:ring-rose-600" />
</td>
<td class="whitespace-nowrap px-3 text-sm text-gray-500 text-center">
<input v-model="item.state" value="not_sure" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.state, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm not sure.`"
<input v-model="item.state" value="not_sure" :id="`item-${item.id}`" @change="() => handleRadioChanged(item.id, item.interest, item.slug)" :name="`item-${item.id}`" type="radio" :title="`I'm not sure.`"
class="h-6 w-6 rounded cursor-pointer border-gray-300 hover:border-gray-500 text-gray-400 focus:ring-gray-600" />
</td>
</tr>
Expand Down

0 comments on commit 3bcc6c3

Please sign in to comment.