From 82f66151fcbbe055f6c26784dcb2bc87d7f3877c Mon Sep 17 00:00:00 2001 From: ivan-sim Date: Wed, 10 Jan 2024 11:59:06 +0700 Subject: [PATCH 1/3] Update --- frontend/hospital-portal/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/hospital-portal/index.html b/frontend/hospital-portal/index.html index 3be7fb7d..b84258ef 100644 --- a/frontend/hospital-portal/index.html +++ b/frontend/hospital-portal/index.html @@ -30,7 +30,7 @@
- + From 209df804580093dd4c8757890d583c7efa0aaa36 Mon Sep 17 00:00:00 2001 From: ivan-sim Date: Wed, 10 Jan 2024 15:32:44 +0700 Subject: [PATCH 2/3] Update --- frontend/hospital-portal/public/lang/en-US.json | 7 ++++++- frontend/hospital-portal/public/lang/id-ID.json | 7 ++++++- .../dashboard/header/NotificationsPopover.tsx | 12 +++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/frontend/hospital-portal/public/lang/en-US.json b/frontend/hospital-portal/public/lang/en-US.json index 48afb22c..e68015ca 100644 --- a/frontend/hospital-portal/public/lang/en-US.json +++ b/frontend/hospital-portal/public/lang/en-US.json @@ -40,5 +40,10 @@ "txtProvider": "Provider", "txtAlertProvider" : "Please enter provider", "txtHelp" : "Need help?", - "txtContactUs" : "Contact Us" + "txtContactUs" : "Contact Us", + "txtNotifications" : "Notifications", + "txtYouHave" : "You have", + "txtUnm" : "unread messages", + "txtNew" : "New", + "txtBeforeThat" : "Before that" } diff --git a/frontend/hospital-portal/public/lang/id-ID.json b/frontend/hospital-portal/public/lang/id-ID.json index 57bb37f9..7b95ede9 100644 --- a/frontend/hospital-portal/public/lang/id-ID.json +++ b/frontend/hospital-portal/public/lang/id-ID.json @@ -40,5 +40,10 @@ "txtProvider": "Provider", "txtAlertProvider" : "Mohon masukan provider", "txtHelp" : "Butuh Bantuan?", - "txtContactUs" : "Kontak Kami" + "txtContactUs" : "Kontak Kami", + "txtNotifications" : "Notifikasi", + "txtYouHave" : "Anda memiliki", + "txtUnm" : "pesan yang belum dibaca", + "txtNew" : "Baru", + "txtBeforeThat" : "Sebelum" } diff --git a/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx b/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx index 4771961c..4800a2b7 100644 --- a/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx +++ b/frontend/hospital-portal/src/layouts/dashboard/header/NotificationsPopover.tsx @@ -1,5 +1,5 @@ import { noCase } from 'change-case'; -import { useState, useEffect } from 'react'; +import { useState, useEffect, useContext } from 'react'; // @mui import { Box, @@ -27,10 +27,12 @@ import MenuPopover from '@/components/MenuPopover'; import { IconButtonAnimate } from '@/components/animate'; import axios from '@/utils/axios'; import { useSnackbar } from 'notistack'; +import { LanguageContext } from '@/contexts/LanguageContext'; // ---------------------------------------------------------------------- export default function NotificationsPopover() { + const { localeData }: any = useContext(LanguageContext); const [notifications, setNotifications] = useState([]); const {enqueueSnackbar} = useSnackbar(); const getDataNotifications = async () => { @@ -88,9 +90,9 @@ export default function NotificationsPopover() { > - Notifications + {localeData.txtNotifications} - You have {totalUnRead} unread messages + {localeData.txtYouHave} {totalUnRead} {localeData.txtUnm} @@ -112,7 +114,7 @@ export default function NotificationsPopover() { disablePadding subheader={ - New + {localeData.txtNew} } > @@ -125,7 +127,7 @@ export default function NotificationsPopover() { disablePadding subheader={ - Before that + {localeData.txtBeforeThat} } > From ec6b6679bbb65353cf45cb765f75d195e3bfdaf0 Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Thu, 11 Jan 2024 10:20:32 +0700 Subject: [PATCH 3/3] optimize import member --- .../Http/Controllers/Api/CorporateMemberController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/Internal/Http/Controllers/Api/CorporateMemberController.php b/Modules/Internal/Http/Controllers/Api/CorporateMemberController.php index 81d5f596..3ed0247b 100644 --- a/Modules/Internal/Http/Controllers/Api/CorporateMemberController.php +++ b/Modules/Internal/Http/Controllers/Api/CorporateMemberController.php @@ -16,6 +16,7 @@ use Illuminate\Contracts\Support\Renderable; use Illuminate\Http\Request; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Storage; +use Illuminate\Console\Command; use Modules\Internal\Services\MemberEnrollmentService; use PDF; use Illuminate\Support\Facades\DB; @@ -158,6 +159,9 @@ class CorporateMemberController extends Controller public function import(Request $request, $corporate_id) { + // setting tambahan php + ini_set('max_execution_time', 300); + $request->validate([ 'file' => 'required|file|mimes:xls,xlsx,csv,txt', ]); @@ -166,7 +170,7 @@ class CorporateMemberController extends Controller $file_name = now()->getPreciseTimestamp(3) . '-' . $request->file('file')->getClientOriginalName(); $file = $request->file('file')->storeAs('temp', $file_name); - $reader = ReaderEntityFactory::createReaderFromFile(Storage::path('temp/' . $file_name)); + $reader = ReaderEntityFactory::createXLSXReader(Storage::path('temp/' . $file_name)); $reader->open(Storage::path('temp/' . $file_name)); $writer = WriterEntityFactory::createXLSXWriter(); @@ -236,6 +240,7 @@ class CorporateMemberController extends Controller break; //only read first sheet } + $reader->close(); $writer->close(); Storage::delete('temp/' . $file_name);