bugs fix callback

This commit is contained in:
Linksehat Staging Server
2024-05-22 14:17:01 +07:00
parent ebd880d9c8
commit 8ae6e44680
4 changed files with 110 additions and 46 deletions

View File

@@ -477,7 +477,7 @@ class Helper
public static function calculateAge($date_brith_day){
// Konversi tanggal lahir ke dalam format UNIX timestamp
$dob = strtotime($date_brith_day);
// Hitung umur berdasarkan tanggal lahir
$umur = date('Y') - date('Y', $dob);
@@ -498,5 +498,34 @@ class Helper
return $start->diffInDays($end) + 1;
}
public static function getStatusLivechat($status) {
switch ($status) {
case 1:
return 'Requested'; // Clearer status name
break;
case 2:
return 'Accepted';
break;
case 3:
return 'Declined';
break;
case 4:
return 'Waiting Payment';
break;
case 5:
return 'Payment Successful';
break;
case 6:
return 'Chat Ended';
break;
case 7:
return 'Payment Failed';
break;
default:
return 'Unknown Status'; // Handle unknown statuses
break;
}
}
}