update
This commit is contained in:
@@ -35,7 +35,7 @@ class MemberResource extends JsonResource
|
|||||||
'corporate' => [
|
'corporate' => [
|
||||||
'code' => $this->currentPolicy?->corporate->code ?? null,
|
'code' => $this->currentPolicy?->corporate->code ?? null,
|
||||||
'name' => $this->currentPolicy?->corporate->name,
|
'name' => $this->currentPolicy?->corporate->name,
|
||||||
'welcome_message' => html_entity_decode($this->currentPolicy?->corporate->welcome_message),
|
'welcome_message' => $this->currentPolicy?->corporate->welcome_message,
|
||||||
'help_text' => $this->currentPolicy?->corporate?->help_text,
|
'help_text' => $this->currentPolicy?->corporate?->help_text,
|
||||||
'avatar_url' => $this->currentpolicy?->corporate?->avatar_url
|
'avatar_url' => $this->currentpolicy?->corporate?->avatar_url
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -135,12 +135,8 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) {
|
|||||||
}
|
}
|
||||||
let existingCodes = response.data.data.map(item => item.code); // get data code corporate all
|
let existingCodes = response.data.data.map(item => item.code); // get data code corporate all
|
||||||
|
|
||||||
existingCodes.filter(function(value) {
|
var filteredArray = existingCodes.filter(e => e != codeCurrent)
|
||||||
return value !== codeCurrent; // Menghapus elemen yang bernilai 3
|
return filteredArray;
|
||||||
});
|
|
||||||
|
|
||||||
console.log(existingCodes)
|
|
||||||
return existingCodes;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
enqueueSnackbar('Failed to fetch existing codes', { variant: 'error' });
|
enqueueSnackbar('Failed to fetch existing codes', { variant: 'error' });
|
||||||
|
|||||||
Reference in New Issue
Block a user