diff --git a/package-lock.json b/package-lock.json index a7c2c54..5567459 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "bootstrap": "^5.3.3", "font-awesome": "^4.7.0", "react": "^18.3.1", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-drag-drop-files": "^2.4.0", "react-icons": "^5.3.0", @@ -5973,6 +5974,15 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "license": "MIT", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, "node_modules/core-js": { "version": "3.39.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", @@ -13344,6 +13354,19 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "license": "MIT", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -15541,6 +15564,12 @@ "node": ">=8.0" } }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==", + "license": "MIT" + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", diff --git a/package.json b/package.json index ba400aa..672eaf4 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "bootstrap": "^5.3.3", "font-awesome": "^4.7.0", "react": "^18.3.1", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-drag-drop-files": "^2.4.0", "react-icons": "^5.3.0", diff --git a/src/App.js b/src/App.js index 58420ca..68565d2 100644 --- a/src/App.js +++ b/src/App.js @@ -13,53 +13,101 @@ import { CreateApps } from './screens/Home'; import { - FaceVerify, - FaceSummary, - FaceTransaction + Verify as FaceVerify, + Summary as FaceSummary, + Transaction as FaceTransaction } from './screens/Biometric/FaceRecognition'; import { Enroll, - VerifySection, + Verify as VerifySection, Liveness, Compare, Search } from './screens/Biometric/FaceRecognition/Section'; import { - ManageKtp, - SummaryKtp, - VerifyKtp, - TransactionKtp + Manage as ManageKtp, + Summary as SummaryKtp, + Verify as VerifyKtp, + Transaction as TransactionKtp } from './screens/Biometric/OcrKtp'; import { - SummaryNpwp, - TransactionNpwp, - VerifyNpwp + Summary as SummaryNpwp, + Transaction as TransactionNpwp, + Verify as VerifyNpwp } from './screens/Biometric/OcrNpwp'; import { - VerifySim, - SummarySim, - TransactionSim + Verify as VerifySim, + Summary as SummarySim, + Transaction as TransactionSim } from './screens/Biometric/OcrSim'; import { - VerifyDoc, - SummaryDoc, - TransactionDoc + Verify as VerifyDoc, + Summary as SummaryDoc, + Transaction as TransactionDoc } from './screens/Biometric/OcrDocument'; import { - SmsVerify + Verify as SmsVerify } from './screens/Sms/Verification'; import { - VerificationAnnoncement, - VerificationOtp + Annoncement as VerificationAnnoncement, + Otp as VerificationOtp } from './screens/Sms/Verification/Section'; +import { + Settings as SmsOtpSettings, + Summary as SmsOtpSummary, + Transaction as SmsOtpTransaction, + Detail as SmsOtpDetail +} from './screens/Sms/OtpManagement'; + +import { + Transaction as SmsOtpSummaryTransaction, + Announcement as SmsOtpSummaryAnnouncement +} from './screens/Sms/OtpManagement/Section'; + +import { + BulkMessage as SmsAnnouncementBulk, + Summary as SmsAnnouncementSummary, + Transaction as SmsAnnouncementTransaction +} from './screens/Sms/Announcements'; + +import { + Transaction as SmsAnnouncementSummaryTransaction, + Announcement as SmsAnnouncementSummaryAnnouncement +} from './screens/Sms/Announcements/Section'; + +import { + Blocked as BlockedSms, + BlockNumber +} from './screens/Sms/BlockedNumbers'; + +import { + Anomaly as AnomalySms +} from './screens/Sms/AnomalyReport'; + +import { + Verify as VerifyWa +} from './screens/Wa/Verify'; + +import { + Auth as AuthWa, + Message as MessageWa +} from './screens/Wa/Verify/Section'; + +import { + Registration as RegistrationWa, + Profile as ProfileWa, + Template as TemplateWa, + Integration as IntegrationWa +} from './screens/Wa/Manage'; +import { CreateSettings } from './screens/Wa/Manage/Content'; const App = () => { return ( @@ -89,12 +137,6 @@ const App = () => { {/* Default route */} } /> - {/* Add routes for the verify section */} - {/* } /> - } /> - } /> - } /> - } /> */} {/* Biometric - Face Recognition (Summary) */} } /> @@ -130,6 +172,54 @@ const App = () => { } /> + {/* Sms Services - OTP (Settings) */} + } /> + {/* Sms Services - OTP (Summary) */} + }> + {/* Anak rute */} + } /> + } /> + {/* Default route */} + } /> + + {/* Sms Services - OTP (Transaction) */} + } /> + {/* Sms Services - OTP (Detail) */} + } /> + + {/* Sms Services - Announcements */} + } /> + }> + {/* Anak rute */} + } /> + } /> + {/* Default route */} + } /> + + } /> + + {/* Sms Services - Block Numbers */} + }> + } /> + + {/* Sms Services - Anomaly Report */} + }> + + {/* WhatsApp - Verify */} + }> + {/* Anak rute */} + } /> + } /> + {/* Default route */} + } /> + + + {/* WhatsApp - Manage */} + } /> + } /> + } /> + } /> + } /> {/* } /> */} {/* Continue for each link */} diff --git a/src/assets/css/app.css b/src/assets/css/app.css index 92c6aa8..ac6a1f5 100644 --- a/src/assets/css/app.css +++ b/src/assets/css/app.css @@ -11287,3 +11287,4 @@ body { background-color: red; font-size: 10px; } + diff --git a/src/assets/images/WAB-1.png b/src/assets/images/WAB-1.png new file mode 100644 index 0000000..df00406 Binary files /dev/null and b/src/assets/images/WAB-1.png differ diff --git a/src/assets/images/WAB-2.png b/src/assets/images/WAB-2.png new file mode 100644 index 0000000..f6cd326 Binary files /dev/null and b/src/assets/images/WAB-2.png differ diff --git a/src/assets/images/index.js b/src/assets/images/index.js index c6ccc7c..759d167 100644 --- a/src/assets/images/index.js +++ b/src/assets/images/index.js @@ -3,11 +3,15 @@ import Logo from './Logo.png'; import DashboardImg from './dashboard-img.png'; import DummyKtp from './Dummy-Ktp.png'; import ServerDownAnimation from './server-down.gif'; +import WAB_1 from './WAB-1.png'; +import WAB_2 from './WAB-2.png'; export { ProfileImage, Logo, DashboardImg, DummyKtp, - ServerDownAnimation + ServerDownAnimation, + WAB_1, + WAB_2 } \ No newline at end of file diff --git a/src/components/Sidebar/dataMenu.js b/src/components/Sidebar/dataMenu.js index 10f7077..238990c 100644 --- a/src/components/Sidebar/dataMenu.js +++ b/src/components/Sidebar/dataMenu.js @@ -137,10 +137,10 @@ const dataMenu = [ name: 'WhatsApp Management', // Changed the name target: 'collapseWaManage', subMenus: [ - { name: 'Register Business Account', link: '/wa-manage-register'}, // Changed the name - { name: 'WhatsApp Profile Settings', link: '/wa-manage-profile'}, // Changed the name - { name: 'Message Templates', link: '/wa-manage-template'}, // Changed the name - { name: 'Integration Settings', link: '/wa-manage-integration'}, // Changed the name + { name: 'Register Business Account', link: '/wa-registration'}, // Changed the name + { name: 'WhatsApp Profile Settings', link: '/wa-profile'}, // Changed the name + { name: 'Message Templates', link: '/wa-template'}, // Changed the name + { name: 'Integration Settings', link: '/wa-integration'}, // Changed the name ], }, { diff --git a/src/screens/Biometric/FaceRecognition/Section/Verify.jsx b/src/screens/Biometric/FaceRecognition/Section/Verify.jsx index 81fff5d..af005dd 100644 --- a/src/screens/Biometric/FaceRecognition/Section/Verify.jsx +++ b/src/screens/Biometric/FaceRecognition/Section/Verify.jsx @@ -667,7 +667,7 @@ const Verify = () => { menuPlacement="auto" inputValue={inputValueApplication} onInputChange={handleInputChangeApplication} // Limit input length for Application ID - /> + /> {applicationError && {applicationError}}
diff --git a/src/screens/Biometric/FaceRecognition/Section/index.js b/src/screens/Biometric/FaceRecognition/Section/index.js index 5192539..f4ea845 100644 --- a/src/screens/Biometric/FaceRecognition/Section/index.js +++ b/src/screens/Biometric/FaceRecognition/Section/index.js @@ -1,12 +1,12 @@ import Enroll from "./Enroll"; -import VerifySection from "./Verify"; +import Verify from "./Verify"; import Compare from "./Compare" import Liveness from "./Liveness" import Search from "./Search" export { Enroll, - VerifySection, + Verify, Compare, Liveness, Search diff --git a/src/screens/Biometric/FaceRecognition/Verify.jsx b/src/screens/Biometric/FaceRecognition/Verify.jsx index 160db3e..6fb6f34 100644 --- a/src/screens/Biometric/FaceRecognition/Verify.jsx +++ b/src/screens/Biometric/FaceRecognition/Verify.jsx @@ -5,7 +5,7 @@ import { Compare, Liveness, Search, - VerifySection + Verify as VerifySection } from './Section'; const Verify = () => { diff --git a/src/screens/Biometric/FaceRecognition/index.js b/src/screens/Biometric/FaceRecognition/index.js index ad6ea8f..e77be84 100644 --- a/src/screens/Biometric/FaceRecognition/index.js +++ b/src/screens/Biometric/FaceRecognition/index.js @@ -1,9 +1,9 @@ -import FaceVerify from "./Verify"; -import FaceSummary from "./Summary"; -import FaceTransaction from "./Transaction"; +import Verify from "./Verify"; +import Summary from "./Summary"; +import Transaction from "./Transaction"; export { - FaceVerify, - FaceSummary, - FaceTransaction + Verify, + Summary, + Transaction } \ No newline at end of file diff --git a/src/screens/Biometric/OcrDocument/index.js b/src/screens/Biometric/OcrDocument/index.js index 55ba4d1..e77be84 100644 --- a/src/screens/Biometric/OcrDocument/index.js +++ b/src/screens/Biometric/OcrDocument/index.js @@ -1,9 +1,9 @@ -import VerifyDoc from "./Verify"; -import SummaryDoc from "./Summary"; -import TransactionDoc from "./Transaction"; +import Verify from "./Verify"; +import Summary from "./Summary"; +import Transaction from "./Transaction"; export { - VerifyDoc, - SummaryDoc, - TransactionDoc + Verify, + Summary, + Transaction } \ No newline at end of file diff --git a/src/screens/Biometric/OcrKtp/Verify.jsx b/src/screens/Biometric/OcrKtp/Verify.jsx index cf2d152..90850eb 100644 --- a/src/screens/Biometric/OcrKtp/Verify.jsx +++ b/src/screens/Biometric/OcrKtp/Verify.jsx @@ -353,7 +353,8 @@ const Verify = () => { color: '#721c24', fontSize: '14px', margin: '0', - },loadingOverlay: { + }, + loadingOverlay: { position: 'fixed', // Gunakan fixed untuk overlay penuh layar top: 0, left: 0, diff --git a/src/screens/Biometric/OcrKtp/index.js b/src/screens/Biometric/OcrKtp/index.js index a48ac53..feadb1f 100644 --- a/src/screens/Biometric/OcrKtp/index.js +++ b/src/screens/Biometric/OcrKtp/index.js @@ -1,11 +1,11 @@ -import VerifyKtp from "./Verify"; -import ManageKtp from "./Manage"; -import SummaryKtp from "./Summary"; -import TransactionKtp from "./Transaction"; +import Verify from "./Verify"; +import Manage from "./Manage"; +import Summary from "./Summary"; +import Transaction from "./Transaction"; export { - VerifyKtp, - ManageKtp, - SummaryKtp, - TransactionKtp + Verify, + Manage, + Summary, + Transaction } \ No newline at end of file diff --git a/src/screens/Biometric/OcrNpwp/index.js b/src/screens/Biometric/OcrNpwp/index.js index 28800e9..e77be84 100644 --- a/src/screens/Biometric/OcrNpwp/index.js +++ b/src/screens/Biometric/OcrNpwp/index.js @@ -1,9 +1,9 @@ -import VerifyNpwp from "./Verify"; -import SummaryNpwp from "./Summary"; -import TransactionNpwp from "./Transaction"; +import Verify from "./Verify"; +import Summary from "./Summary"; +import Transaction from "./Transaction"; export { - VerifyNpwp, - SummaryNpwp, - TransactionNpwp + Verify, + Summary, + Transaction } \ No newline at end of file diff --git a/src/screens/Biometric/OcrSim/index.js b/src/screens/Biometric/OcrSim/index.js index 2f272a6..e77be84 100644 --- a/src/screens/Biometric/OcrSim/index.js +++ b/src/screens/Biometric/OcrSim/index.js @@ -1,9 +1,9 @@ -import VerifySim from "./Verify"; -import SummarySim from "./Summary"; -import TransactionSim from "./Transaction"; +import Verify from "./Verify"; +import Summary from "./Summary"; +import Transaction from "./Transaction"; export { - VerifySim, - SummarySim, - TransactionSim + Verify, + Summary, + Transaction } \ No newline at end of file diff --git a/src/screens/Sms/Announcements/Bulk.jsx b/src/screens/Sms/Announcements/Bulk.jsx new file mode 100644 index 0000000..b51beae --- /dev/null +++ b/src/screens/Sms/Announcements/Bulk.jsx @@ -0,0 +1,295 @@ +import React, { useState, useEffect } from 'react' +import { CloudDownload } from '../../../assets/icon'; + +const Bulk = () => { + const BASE_URL = process.env.REACT_APP_BASE_URL + const API_KEY = process.env.REACT_APP_API_KEY + + const [selectedImageName, setSelectedImageName] = useState(''); + const [errorMessage, setErrorMessage] = useState(''); + const [applicationId, setApplicationId] = useState(''); + const [applicationIds, setApplicationIds] = useState([]); + const [isSelectOpen, setIsSelectOpen] = useState(false); + const [isMobile, setIsMobile] = useState(false); + + useEffect(() => { + const handleResize = () => { + setIsMobile(window.innerWidth <= 768); // Set mobile state based on window width + }; + + handleResize(); // Initial check on component mount + window.addEventListener('resize', handleResize); // Listen for resize events + + return () => { + window.removeEventListener('resize', handleResize); // Cleanup on component unmount + }; + }, []); + + useEffect(() => { + const fetchApplicationIds = async () => { + try { + const url = `${BASE_URL}/application/list`; + console.log('Fetching URL:', url); // Log the URL + + const response = await fetch(url, { + method: 'GET', + headers: { + 'accept': 'application/json', + 'x-api-key': `${API_KEY}`, + }, + }); + + const data = await response.json(); + + if (data.status_code === 200) { + const ids = data.details.data.map(app => app.id); + console.log('Application Id: ' + ids); // Log the IDs + setApplicationIds(data.details.data); // Update state with the fetched data + } else { + console.error('Failed to fetch data:', data.details.message); + } + } catch (error) { + console.error('Error fetching application IDs:', error); + } + }; + + fetchApplicationIds(); + }, []); + + const handleFocus = () => { + setIsSelectOpen(true); + }; + + const handleBlur = () => { + setIsSelectOpen(false); + }; + + const handleFileUpload = (event) => { + const file = event.target.files[0]; + + if (file && (file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg')) { + setSelectedImageName(file.name); + setErrorMessage(''); + } else { + alert('Please upload a valid image file (JPG, JPEG, PNG).'); + } + }; + + return ( +
+
+
+ Download Icon +
+

Check Our Service Status

+

+ Access pre-approved message templates designed for various purposes, including customer support, appointment reminders, order updates, and more. + Simplify your communication by using these ready-to-go formats. +

+
+
+ + + Download Template + +
+ +
+
+
+ + + + +