Skip to content

Commit 5507989

Browse files
authored
Merge pull request #46 from SyncfusionExamples/1000396-EmployeeManagement
1000396: Fixing UI issues in Employee Management
2 parents 9007782 + 6ba078a commit 5507989

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

Employee_Managment_App/src/components/EmployeeInfo.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ const EmployeeInfo = (props: { employeeData?: EmployeeDetails; userInfo?: Employ
8787
let employeeData: EmployeeDetails = (routeEmployee as any) ?? (props.employeeData as any) ?? (userInfo as any) ?? (defaultEmployee as any) ?? defaultEmployeeData;
8888
// Format the date to the desired output
8989
const custom: Intl.DateTimeFormatOptions = {
90-
day: 'numeric', // Displays day as a number (e.g., 1)
91-
month: 'short', // Displays the short month name (e.g., Feb)
92-
year: 'numeric' // Displays the full year (e.g., 2005)
90+
day: 'numeric',
91+
month: 'short',
92+
year: 'numeric'
9393
};
9494

9595
// Normalize possible string dates to Date objects and guard for missing values
@@ -100,8 +100,8 @@ const EmployeeInfo = (props: { employeeData?: EmployeeDetails; userInfo?: Employ
100100
? new Date((employeeData as any).DOB)
101101
: null;
102102

103-
const dateOfJoining: string = dojDate ? dojDate.toLocaleDateString('en-GB', custom) : '-';
104-
const dob: string = dobDate ? dobDate.toLocaleDateString('en-GB', custom) : '-';
103+
const dateOfJoining: string = dojDate ? dojDate.toLocaleDateString('en-US', custom).replace(/,/g, ''): '-';
104+
const dob: string = dobDate ? dobDate.toLocaleDateString('en-US', custom).replace(/,/g, ''): '-';
105105

106106
const now = new Date();
107107
let experienceYears = 0;
@@ -329,7 +329,7 @@ const canSeePrivateTabs =
329329
/>
330330
</svg>
331331
</div>
332-
<div>
332+
<div className="profile-content">
333333
<div className="profile-data-name">{employeeData.Name}</div>
334334
<div className="profile-data-mail">{employeeData.Mail}</div>
335335
<div className="profile-data-designation">{employeeData.Designation}</div>

Employee_Managment_App/src/components/Employees.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const Employees = (props?: EmployeesProps) => {
217217
headerText="Date Joined"
218218
textAlign="Right"
219219
type="date"
220-
format={{ type: 'date', format: "d MMM yyyy"}}
220+
format={{ type: 'date', format: "MMM d yyyy"}}
221221
clipMode="EllipsisWithTooltip"
222222
width="150"
223223
/>

Employee_Managment_App/src/components/Policies.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
display: inline-flex;
149149
align-items: center;
150150
gap: 10px;
151-
padding: 9px 14px;
151+
padding: 5px 14px;
152152
border-radius: 999px;
153153
border: 1px solid var(--border);
154154
background: var(--surface);

Employee_Managment_App/src/components/Policies.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ const Policies: React.FC = () => {
168168
<ColumnsDirective>
169169
<ColumnDirective field="policyName" headerText="Policy Name" width="220" template={policyNameTemplate} />
170170
<ColumnDirective field="category" headerText="Category" width="170" template={categoryTemplate} />
171-
<ColumnDirective field="lastUpdated" headerText="Last Updated" width="150" type="date" format="d MMM yyyy" textAlign="Right" />
172-
<ColumnDirective field="enrolledOn" headerText="Enrolled On" width="150" type="date" format="d MMM yyyy" textAlign="Right" />
171+
<ColumnDirective field="lastUpdated" headerText="Last Updated" width="150" type="date" format="MMM d yyyy" textAlign="Right" />
172+
<ColumnDirective field="enrolledOn" headerText="Enrolled On" width="150" type="date" format="MMM d yyyy" textAlign="Right" />
173173
<ColumnDirective field="statusText" headerText="Status" width="130" template={statusTemplate} textAlign="Center" />
174174
<ColumnDirective headerText="Actions" width="110" commands={viewCommands} textAlign="Center" />
175175
</ColumnsDirective>

Employee_Managment_App/src/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58156,6 +58156,10 @@ ejs-sidebar {
5815658156
.e-leftfreeze .CardTable{
5815758157
margin-left: 0px;
5815858158
}
58159+
.profile-content{
58160+
display: ruby;
58161+
margin-left: 15px;
58162+
}
5815958163

5816058164
td[aria-label=" is template cell column header Total"] .CardTable {
5816158165
margin-left: 20px; /* Adjust as needed */

0 commit comments

Comments
 (0)