Fix Show All Paginate

This commit is contained in:
2022-07-27 14:39:00 +07:00
parent 214a2f3ce2
commit 7d2a1d6e98
4 changed files with 4 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ class BenefitController extends Controller
$benefits = Benefit::query()
->filter($request->all())
->where('corporate_id', $corporate_id)
->paginate(0)
->paginate(999)
->appends($request->all());
return $benefits;

View File

@@ -91,6 +91,7 @@ class CorporateService
$plan = Benefit::updateOrCreate([
'service_code' => $benefit_data['service_code'],
'plan_code' => $benefit_data['plan_code'],
'corporate_id' => $corporate->id,
'code' => $benefit_data['code'],
], $benefit_data);

View File

@@ -422,7 +422,7 @@ export default function PlanList() {
) : (
<TableBody>
{dataTableData.data.map(row => (
<Row key={row.code} row={row} />
<Row key={row.id} row={row} />
))}
</TableBody>
)

View File

@@ -404,7 +404,7 @@ export default function CorporatePlanList() {
) : (
<TableBody>
{dataTableData.data.map(row => (
<Row key={row.code} row={row} />
<Row key={row.id} row={row} />
))}
</TableBody>
)