Skip to content

Commit 3230700

Browse files
1000395: Fixed issues in Employee Management
1 parent 2ceede1 commit 3230700

File tree

8 files changed

+67
-20
lines changed

8 files changed

+67
-20
lines changed

Employee_Managment_App/src/components/Announcement.css

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,30 +78,32 @@
7878

7979
/* Tabs */
8080
.annc-panel-tabs {
81-
display: flex;
82-
gap: 8px;
83-
padding: 8px 8px 0 8px;
81+
display: grid;
82+
grid-template-columns: 1fr 1fr; /* two tabs take full width equally */
83+
padding: 0; /* remove extra gaps to match design */
8484
border-bottom: 1px solid var(--annc-border);
8585
}
8686
.annc-panel-tabs button {
8787
background: transparent;
8888
border: none;
89-
color: #475569;
90-
padding: 8px 10px;
91-
border-radius: 8px 8px 0 0;
89+
padding: 12px 0; /* taller clickable area */
90+
border-radius: 0; /* flush edges*/
9291
position: relative;
9392
cursor: pointer;
93+
width: 100%;
94+
display: flex;
95+
align-items: center;
96+
justify-content: center; /* center icon */
9497
}
9598
.annc-panel-tabs button.active { color: var(--annc-theme); }
9699
.annc-panel-tabs button.active::after {
97100
content: '';
98101
position: absolute;
99-
left: 8px;
100-
right: 8px;
102+
left: 0; /* underline spans the full half */
103+
right: 0;
101104
bottom: -1px;
102105
height: 2px;
103106
background: var(--annc-theme);
104-
border-radius: 2px;
105107
}
106108

107109
/* Subheader */
@@ -120,6 +122,13 @@
120122
font-weight: 600;
121123
cursor: pointer;
122124
}
125+
/* Disabled state for Syncfusion button */
126+
.annc-panel-cta.e-disabled,
127+
.annc-panel-cta[disabled] {
128+
opacity: 0.5;
129+
cursor: not-allowed;
130+
pointer-events: none;
131+
}
123132

124133
/* Content */
125134
.annc-panel-content {
@@ -158,7 +167,6 @@
158167
.annc-panel-item.is-read {
159168
margin-bottom: 5px;
160169
padding: 6px;
161-
opacity: 0.75;
162170
}
163171
.annc-panel-item:hover {
164172
background: var(--color-sf-secondary-bg-color-hover);

Employee_Managment_App/src/components/Announcement.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ export const AnnouncementPanel: React.FC<AnnouncementPanelProps> = ({
162162
<ButtonComponent
163163
cssClass="annc-panel-cta"
164164
type="button"
165+
disabled={!items.some((it) => !it.read)}
165166
onClick={handleMarkAllRead}
166167
>
167168
Mark all read
@@ -185,7 +186,7 @@ export const AnnouncementPanel: React.FC<AnnouncementPanelProps> = ({
185186
<i className={it.iconClass ?? (it.type === 'announcement' ? 'e-icons e-audio' : 'e-icons e-multiple-comment')} />
186187
</span>
187188
<div className="annc-item-body">
188-
<div className={`annc-item-title ${it.read ? 'read' : 'unread'}`}>{it.title}</div>
189+
<div className={`annc-item-title ${!it.read ? 'unread' : ''}`}>{it.title}</div>
189190
{(it.subtitle || it.date) && (
190191
<div className="annc-item-meta">
191192
{it.subtitle && <span className="meta">{it.subtitle}</span>}

Employee_Managment_App/src/components/AnnouncementDetailDialog.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ export const AnnouncementDetailDialog: React.FC<AnnouncementDetailDialogProps> =
5656
onMarkRead,
5757
}) => {
5858
const { label, Icon } = getMeta(item?.type);
59+
// Use dialog ref to trigger built-in hide animation for custom buttons
60+
const dialogRef = React.useRef<DialogComponent | null>(null);
61+
const hideWithAnimation = () => {
62+
dialogRef.current?.hide();
63+
};
5964

6065
const headerTemplate = () => (
6166
<div className="annc-dlg-header" role="group" aria-label="Announcement header">
@@ -96,17 +101,19 @@ export const AnnouncementDetailDialog: React.FC<AnnouncementDetailDialogProps> =
96101
<ButtonComponent cssClass="e-primary" onClick={() => {
97102
const isNotification = item.type === 'notification';
98103
onMarkRead?.(item.id, isNotification);
99-
onClose();
104+
// trigger dialog close with animation; onClose will be fired on close event
105+
hideWithAnimation();
100106
}}>
101107
Mark as read
102108
</ButtonComponent>
103109
)}
104-
<ButtonComponent onClick={onClose}>Close</ButtonComponent>
110+
<ButtonComponent onClick={hideWithAnimation}>Close</ButtonComponent>
105111
</div>
106112
);
107113

108114
return (
109115
<DialogComponent
116+
ref={dialogRef}
110117
isModal
111118
visible={open}
112119
showCloseIcon
@@ -118,7 +125,7 @@ export const AnnouncementDetailDialog: React.FC<AnnouncementDetailDialogProps> =
118125
header={headerTemplate}
119126
footerTemplate={footerTemplate}
120127
target="body"
121-
overlayClick={onClose}
128+
overlayClick={hideWithAnimation}
122129
close={onClose}
123130
>
124131
<div className="annc-dlg-content">

Employee_Managment_App/src/components/EmployeeLeave.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@
8282
color: inherit;
8383
}
8484

85+
/* Apply icon vertical adjustment only on mobile screens */
86+
@media (max-width: 768px) {
87+
.drp-icon-left .e-icons,
88+
.drp-caret-right .e-icons,
89+
.calendar-i,
90+
.caret-i {
91+
margin-top: 8px;
92+
}
93+
}
94+
8595
/* ensure icon button sits above the input text */
8696
.drp-icon-left,
8797
.drp-caret-right {
@@ -267,3 +277,22 @@
267277
.status-pending {
268278
background-color: #007bff; /* blue */
269279
}
280+
281+
/* Mobile tab next-arrow should be perfectly vertical (remove skew from scroll buttons) */
282+
@media (max-width: 768px) {
283+
/* Horizontal Tab header scroll buttons */
284+
.e-tab .e-hscroll.e-scroll-device .e-scroll-nav,
285+
.e-tab .e-rtl.e-hscroll.e-scroll-device .e-scroll-nav,
286+
.e-tab .e-vscroll.e-scroll-device .e-scroll-nav,
287+
.e-tab .e-rtl.e-vscroll.e-scroll-device .e-scroll-nav {
288+
-webkit-transform: none !important;
289+
transform: none !important;
290+
}
291+
.e-tab .e-hscroll.e-scroll-device .e-scroll-nav .e-nav-arrow,
292+
.e-tab .e-rtl.e-hscroll.e-scroll-device .e-scroll-nav .e-nav-arrow,
293+
.e-tab .e-vscroll.e-scroll-device .e-scroll-nav .e-nav-arrow,
294+
.e-tab .e-rtl.e-vscroll.e-scroll-device .e-scroll-nav .e-nav-arrow {
295+
-webkit-transform: none !important;
296+
transform: none !important;
297+
}
298+
}

Employee_Managment_App/src/components/EmployeePayRoll.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,15 +470,15 @@ const EmployeePayRoll = (props: { employeeData: EmployeeDetails }) => {
470470
field="Item"
471471
type="Custom"
472472
footerTemplate={() => {
473-
return <span>Net Pay</span>;
473+
return <strong>Net Pay</strong>;
474474
}}
475475
/>
476476
<AggregateColumnDirective
477477
field="Total"
478478
type="Custom"
479479
customAggregate={calculteNetPayInYear}
480480
footerTemplate={(props: any) => {
481-
return <span>$ {props.Custom}</span>;
481+
return <strong>$ {props.Custom}</strong>;
482482
}}
483483
/>
484484
{months.map((x, index) => {

Employee_Managment_App/src/components/EmployeePayStub.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const EmployeePayStub = (props: { employeeData: EmployeeDetails }) => {
275275
field="Item"
276276
type="Custom"
277277
footerTemplate={() => {
278-
return <span>Net Pay</span>;
278+
return <strong>Net Pay</strong>;
279279
}}
280280
/>
281281
{months.map((x, index) => {
@@ -286,7 +286,7 @@ const EmployeePayStub = (props: { employeeData: EmployeeDetails }) => {
286286
type="Custom"
287287
customAggregate={calculteNetPayAggregate}
288288
footerTemplate={(props: any) => {
289-
return <span>$ {props.Custom}</span>;
289+
return <strong>$ {props.Custom}</strong>;
290290
}}
291291
/>
292292
);

Employee_Managment_App/src/components/TopNav.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
--search-text: #111827;
3737
--search-muted: #6b7280;
3838
--search-icon: #6b7280;
39+
--nav-border:rgb(150, 150, 160);
3940

4041
--shadow-rest: 0 1px 2px rgba(0,0,0,.06);
4142
--shadow-focus: 0 6px 18px rgba(16, 185, 129, 0.16);
@@ -54,7 +55,8 @@
5455
z-index: 1000;
5556
height: var(--topnav-height);
5657
background: var(--topnav-bg);
57-
border-bottom: 2px solid var(--topnav-border);
58+
border-bottom: 0.5px solid var(--nav-border);
59+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
5860
}
5961

6062
/* Optional green accent line/shadow */

Employee_Managment_App/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50379,7 +50379,7 @@ body.e-colorpicker-overflow {
5037950379
-webkit-box-shadow: none;
5038050380
box-shadow: none;
5038150381
font-weight: 400;
50382-
border-bottom: 1px solid var(--color-sf-border-light);
50382+
border-bottom: 1px solid rgb(0, 0, 0, 0.2);
5038350383
}
5038450384

5038550385
.e-tab .e-tab-header::before {

0 commit comments

Comments
 (0)