diff --git a/src/_components/Auth/InputDate/index.js b/src/_components/Auth/InputDate/index.js
index b90bfba..db8c809 100644
--- a/src/_components/Auth/InputDate/index.js
+++ b/src/_components/Auth/InputDate/index.js
@@ -72,6 +72,7 @@ const InputDate = (props) => {
}`}
selected={props.value}
onChange={(date) => changeValue(date)}
+ disabledKeyboardNavigation
// showMonthDropdown
showYearDropdown
showMonthYearPicker={!!props?.isMonthPicker}
diff --git a/src/_components/Auth/InputDate/index.scss b/src/_components/Auth/InputDate/index.scss
index d45f4f8..edb82c0 100644
--- a/src/_components/Auth/InputDate/index.scss
+++ b/src/_components/Auth/InputDate/index.scss
@@ -53,6 +53,18 @@ $border-color: #4a4848;
}
}
+ .react-datepicker {
+ &__month-text {
+
+ &--selected,
+ &--in-selecting-range,
+ &--in-range {
+ border-radius: 8px !important;
+
+ }
+ }
+ }
+
input {
height: 100%;
border: none;
diff --git a/src/_components/boxChart/BoxDoughnutBarChart.js b/src/_components/boxChart/BoxDoughnutBarChart.js
index b4c69ad..ca53de4 100644
--- a/src/_components/boxChart/BoxDoughnutBarChart.js
+++ b/src/_components/boxChart/BoxDoughnutBarChart.js
@@ -2,9 +2,19 @@ import { PRIMARY_COLOR } from '../../_constants/common'
import RDoughnutChart from '../chart/RDoughnutChart'
import './boxChart.scss'
import { VerticalBarChart } from '../chart/VerticalBarChart'
-import { useState } from 'react'
+import { useEffect, useState } from 'react'
import InputDate from '../Auth/InputDate'
-import { renderIconDate } from '../renderIcon'
+import { renderIconButton, renderIconButtonLeft, renderIconDate } from '../renderIcon'
+
+const Btn = ({ icon, isDisabled = false, onClick }) => {
+ return (
+
+ );
+};
export default function BoxDoughnutBarChart({
dataDoughnut = [],
@@ -23,7 +33,6 @@ export default function BoxDoughnutBarChart({
const handleMonthChange = (date) => {
setMonth(date)
- onSetDateBarChart?.(date)
}
const renderDoughnutSection = () => (
@@ -59,26 +68,58 @@ export default function BoxDoughnutBarChart({
)}
)
+ const handleClickNext = () => {
+ const newMonth = month.getMonth() + 1;
+ const newYear = month.getFullYear();
+
+ if (newMonth > 11) {
+ setMonth(new Date(newYear + 1, 0, 1));
+ } else {
+ setMonth(new Date(newYear, newMonth, 1));
+ }
+ };
+
+ const handleClickPrev = () => {
+ const newMonth = month.getMonth() - 1;
+ const newYear = month.getFullYear();
+
+ if (newMonth < 0) {
+ setMonth(new Date(newYear - 1, 11, 1));
+ } else {
+ setMonth(new Date(newYear, newMonth, 1));
+ }
+ };
+
+ useEffect(() => {
+ onSetDateBarChart?.(month);
+ }, [month]);
+
+ const isDisabledNext = new Date(month).getMonth() === new Date().getMonth() && new Date(month).getFullYear() === new Date().getFullYear();
+
return (
{renderDoughnutSection()}
{renderBarSection()}
-
)
diff --git a/src/_components/boxChart/boxChart.scss b/src/_components/boxChart/boxChart.scss
index cbe3ceb..493f533 100644
--- a/src/_components/boxChart/boxChart.scss
+++ b/src/_components/boxChart/boxChart.scss
@@ -20,4 +20,32 @@
}
.doughnut-chart-content {}
+
+ .custom-button {
+ padding: 0 32px;
+ height: 40px;
+ border-radius: 20px;
+ border: none;
+ font-size: 16px;
+ color: #fff;
+ font-family: 'Myriadpro-SemiBold';
+ background-color: var(--button-bg-color);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ white-space: nowrap;
+ width: max-content;
+ margin: 0 10px;
+ }
+
+ .custom-button:hover {
+ background-color: #c07a05;
+ }
+
+ .button-disable {
+ cursor: not-allowed;
+ /* background: #70707070 !important; */
+ background: #c1c1c1 !important;
+ pointer-events: none;
+ }
}
\ No newline at end of file
diff --git a/src/_components/renderIcon/index.js b/src/_components/renderIcon/index.js
index 344be74..0bf0387 100644
--- a/src/_components/renderIcon/index.js
+++ b/src/_components/renderIcon/index.js
@@ -145,6 +145,21 @@ export const renderIconButton = () => {
)
}
+export const renderIconButtonLeft = () => {
+ return (
+
+ );
+}
+
export const renderIconDate = () => (
diff --git a/src/_screens/home/outstanding-teacher/index.js b/src/_screens/home/outstanding-teacher/index.js
index c7469a7..563245f 100644
--- a/src/_screens/home/outstanding-teacher/index.js
+++ b/src/_screens/home/outstanding-teacher/index.js
@@ -130,7 +130,7 @@ export default function OutstandingTeacher() {
{!isLoading && !listTeacher?.length && (
- Không có giáo viên nào
+ Không còn GV nào để hiển thị
)}
{listTeacher.map((item, index) => {