Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Server D3 Linksehat
2025-08-19 09:42:45 +07:00
3 changed files with 60 additions and 0 deletions

View File

@@ -134,6 +134,26 @@ class MemberController extends Controller
$res_data['companies'] = $companies;
$corporateEmployeePremi = DB::table('corporate_employees')
->leftJoin('corporates', 'corporates.id', '=', 'corporate_employees.corporate_id')
->leftJoin('corporate_policies', 'corporate_policies.corporate_id', '=', 'corporates.id')
->where('corporate_employees.status', 'ACTIVE')
->where('corporates.active', 1)
->where('corporate_policies.active', 1)
->where('corporate_employees.member_id', $members->id)
->value('corporate_policies.total_premi');
$res_data['total_premi'] = $corporateEmployeePremi ?? 0;
$limitRules = DB::table('member_plans')
->leftJoin('plans', 'plans.id', '=', 'member_plans.plan_id')
->where('member_plans.member_id', $members->id)
->where('member_plans.status', 'active')
->where('plans.active', 1)
->value('plans.limit_rules');
$res_data['limit_rules'] = $limitRules ?? 0;
// specialities
$specialities = DB::table('specialities')
->select(

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('files', function (Blueprint $table) {
$table->string('source')->after('extension')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('files', function (Blueprint $table) {
$table->dropColumn('source');
});
}
};

View File

@@ -112,6 +112,14 @@ export default function DialogMember(member:any, handleSubmitSuccess:() => void)
<Typography sx={{width:'50%'}} variant="body2">Policy Number</Typography>
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.members.policy_id ?? '-'}</Typography>
</Stack>
<Stack direction="row" justifyContent="space-between">
<Typography sx={{width:'50%'}} variant="body2">Deposit Corporate</Typography>
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.total_premi ? fCurrency(member?.total_premi) : '-'}</Typography>
</Stack>
<Stack direction="row" justifyContent="space-between">
<Typography sx={{width:'50%'}} variant="body2">Limit Peserta</Typography>
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.limit_rules ? fCurrency(member?.limit_rules) : '-'}</Typography>
</Stack>
<Stack direction="row" justifyContent="space-between">
<Typography sx={{width:'50%'}} variant="body2">NRIC</Typography>
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{member?.members.nik ?? '-'}</Typography>