Update
This commit is contained in:
@@ -340,6 +340,8 @@ export default function TableListFinalLog() {
|
||||
setData(
|
||||
response.data.data.map((obj: any) => ({
|
||||
...obj,
|
||||
provider:formatTitleCase(obj.provider),
|
||||
full_name:formatTitleCase(obj.full_name),
|
||||
status:
|
||||
obj.status === 'requested' ? (
|
||||
<Label color='primary'>
|
||||
@@ -426,6 +428,14 @@ export default function TableListFinalLog() {
|
||||
const [currentMember, setCurrentMember] = useState(null);
|
||||
const [nameMember, setNameMember] = useState('');
|
||||
|
||||
|
||||
const formatTitleCase = (str:any) => {
|
||||
if (str) {
|
||||
return str.replace(/\w\S*/g, (txt:any) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
|
||||
}
|
||||
return ''; // Mengembalikan string kosong jika input adalah null atau undefined
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<TableComponent
|
||||
|
||||
@@ -332,6 +332,8 @@ export default function TableList() {
|
||||
setData(
|
||||
response.data.data.map((obj: any) => ({
|
||||
...obj,
|
||||
provider:formatTitleCase(obj.provider),
|
||||
full_name:formatTitleCase(obj.full_name),
|
||||
status:
|
||||
obj.status === 'requested' ? (
|
||||
<Label color='primary'>
|
||||
@@ -422,6 +424,12 @@ export default function TableList() {
|
||||
const [setIsRequestFinalLog, isRequestFinalLog] = useState(false);
|
||||
const [dataViewFinalDialog, setDataViewFinalDialog] = useState<any>(null);
|
||||
|
||||
const formatTitleCase = (str:any) => {
|
||||
if (str) {
|
||||
return str.replace(/\w\S*/g, (txt:any) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
|
||||
}
|
||||
return ''; // Mengembalikan string kosong jika input adalah null atau undefined
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<TableComponent
|
||||
|
||||
Reference in New Issue
Block a user