Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -16,6 +16,7 @@ use Illuminate\Contracts\Support\Renderable;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Routing\Controller;
|
use Illuminate\Routing\Controller;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
use Modules\Internal\Services\MemberEnrollmentService;
|
use Modules\Internal\Services\MemberEnrollmentService;
|
||||||
use PDF;
|
use PDF;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
@@ -158,6 +159,9 @@ class CorporateMemberController extends Controller
|
|||||||
|
|
||||||
public function import(Request $request, $corporate_id)
|
public function import(Request $request, $corporate_id)
|
||||||
{
|
{
|
||||||
|
// setting tambahan php
|
||||||
|
ini_set('max_execution_time', 300);
|
||||||
|
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'file' => 'required|file|mimes:xls,xlsx,csv,txt',
|
'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_name = now()->getPreciseTimestamp(3) . '-' . $request->file('file')->getClientOriginalName();
|
||||||
$file = $request->file('file')->storeAs('temp', $file_name);
|
$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));
|
$reader->open(Storage::path('temp/' . $file_name));
|
||||||
|
|
||||||
$writer = WriterEntityFactory::createXLSXWriter();
|
$writer = WriterEntityFactory::createXLSXWriter();
|
||||||
@@ -236,6 +240,7 @@ class CorporateMemberController extends Controller
|
|||||||
|
|
||||||
break; //only read first sheet
|
break; //only read first sheet
|
||||||
}
|
}
|
||||||
|
|
||||||
$reader->close();
|
$reader->close();
|
||||||
$writer->close();
|
$writer->close();
|
||||||
Storage::delete('temp/' . $file_name);
|
Storage::delete('temp/' . $file_name);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
||||||
<script type="module" src="/src/index.tsx"></script>
|
<script type="module" src="/src/index.tsx?v=<?php echo time(); ?>"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -40,5 +40,10 @@
|
|||||||
"txtProvider": "Provider",
|
"txtProvider": "Provider",
|
||||||
"txtAlertProvider" : "Please enter provider",
|
"txtAlertProvider" : "Please enter provider",
|
||||||
"txtHelp" : "Need help?",
|
"txtHelp" : "Need help?",
|
||||||
"txtContactUs" : "Contact Us"
|
"txtContactUs" : "Contact Us",
|
||||||
|
"txtNotifications" : "Notifications",
|
||||||
|
"txtYouHave" : "You have",
|
||||||
|
"txtUnm" : "unread messages",
|
||||||
|
"txtNew" : "New",
|
||||||
|
"txtBeforeThat" : "Before that"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,5 +40,10 @@
|
|||||||
"txtProvider": "Provider",
|
"txtProvider": "Provider",
|
||||||
"txtAlertProvider" : "Mohon masukan provider",
|
"txtAlertProvider" : "Mohon masukan provider",
|
||||||
"txtHelp" : "Butuh Bantuan?",
|
"txtHelp" : "Butuh Bantuan?",
|
||||||
"txtContactUs" : "Kontak Kami"
|
"txtContactUs" : "Kontak Kami",
|
||||||
|
"txtNotifications" : "Notifikasi",
|
||||||
|
"txtYouHave" : "Anda memiliki",
|
||||||
|
"txtUnm" : "pesan yang belum dibaca",
|
||||||
|
"txtNew" : "Baru",
|
||||||
|
"txtBeforeThat" : "Sebelum"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { noCase } from 'change-case';
|
import { noCase } from 'change-case';
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect, useContext } from 'react';
|
||||||
// @mui
|
// @mui
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
@@ -27,10 +27,12 @@ import MenuPopover from '@/components/MenuPopover';
|
|||||||
import { IconButtonAnimate } from '@/components/animate';
|
import { IconButtonAnimate } from '@/components/animate';
|
||||||
import axios from '@/utils/axios';
|
import axios from '@/utils/axios';
|
||||||
import { useSnackbar } from 'notistack';
|
import { useSnackbar } from 'notistack';
|
||||||
|
import { LanguageContext } from '@/contexts/LanguageContext';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function NotificationsPopover() {
|
export default function NotificationsPopover() {
|
||||||
|
const { localeData }: any = useContext(LanguageContext);
|
||||||
const [notifications, setNotifications] = useState([]);
|
const [notifications, setNotifications] = useState([]);
|
||||||
const {enqueueSnackbar} = useSnackbar();
|
const {enqueueSnackbar} = useSnackbar();
|
||||||
const getDataNotifications = async () => {
|
const getDataNotifications = async () => {
|
||||||
@@ -88,9 +90,9 @@ export default function NotificationsPopover() {
|
|||||||
>
|
>
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', py: 2, px: 2.5 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', py: 2, px: 2.5 }}>
|
||||||
<Box sx={{ flexGrow: 1 }}>
|
<Box sx={{ flexGrow: 1 }}>
|
||||||
<Typography variant="subtitle1">Notifications</Typography>
|
<Typography variant="subtitle1">{localeData.txtNotifications}</Typography>
|
||||||
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
|
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
|
||||||
You have {totalUnRead} unread messages
|
{localeData.txtYouHave} {totalUnRead} {localeData.txtUnm}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
@@ -112,7 +114,7 @@ export default function NotificationsPopover() {
|
|||||||
disablePadding
|
disablePadding
|
||||||
subheader={
|
subheader={
|
||||||
<ListSubheader disableSticky sx={{ py: 1, px: 2.5, typography: 'overline' }}>
|
<ListSubheader disableSticky sx={{ py: 1, px: 2.5, typography: 'overline' }}>
|
||||||
New
|
{localeData.txtNew}
|
||||||
</ListSubheader>
|
</ListSubheader>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -125,7 +127,7 @@ export default function NotificationsPopover() {
|
|||||||
disablePadding
|
disablePadding
|
||||||
subheader={
|
subheader={
|
||||||
<ListSubheader disableSticky sx={{ py: 1, px: 2.5, typography: 'overline' }}>
|
<ListSubheader disableSticky sx={{ py: 1, px: 2.5, typography: 'overline' }}>
|
||||||
Before that
|
{localeData.txtBeforeThat}
|
||||||
</ListSubheader>
|
</ListSubheader>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user