wip
This commit is contained in:
parent
5fab58ff6f
commit
02087d1ff9
2 changed files with 51 additions and 7 deletions
|
|
@ -464,6 +464,11 @@ swp-edit-select {
|
||||||
/* ===========================================
|
/* ===========================================
|
||||||
VIEW CONTAINERS (List/Detail swap)
|
VIEW CONTAINERS (List/Detail swap)
|
||||||
=========================================== */
|
=========================================== */
|
||||||
|
swp-employees-list-view,
|
||||||
|
swp-employee-detail-view {
|
||||||
|
transition: opacity 100ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
swp-employees-list-view {
|
swp-employees-list-view {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
@ -473,6 +478,15 @@ swp-employee-detail-view {
|
||||||
min-height: calc(100vh - 60px);
|
min-height: calc(100vh - 60px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* View transition states */
|
||||||
|
.view-fade-out {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-fade-in {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
swp-back-link {
|
swp-back-link {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,27 @@ export class EmployeesController {
|
||||||
*/
|
*/
|
||||||
private showDetailViewInternal(employeeKey: string): void {
|
private showDetailViewInternal(employeeKey: string): void {
|
||||||
if (this.listView && this.detailView) {
|
if (this.listView && this.detailView) {
|
||||||
this.listView.style.display = 'none';
|
// Fade out list view
|
||||||
this.detailView.style.display = 'block';
|
this.listView.classList.add('view-fade-out');
|
||||||
this.detailView.dataset.employee = employeeKey;
|
|
||||||
|
|
||||||
// Reset to first tab
|
// After fade, switch views
|
||||||
this.switchTab(this.detailView, 'general');
|
setTimeout(() => {
|
||||||
|
this.listView!.style.display = 'none';
|
||||||
|
this.listView!.classList.remove('view-fade-out');
|
||||||
|
|
||||||
|
// Show detail view with fade in
|
||||||
|
this.detailView!.style.display = 'block';
|
||||||
|
this.detailView!.classList.add('view-fade-out');
|
||||||
|
this.detailView!.dataset.employee = employeeKey;
|
||||||
|
|
||||||
|
// Reset to first tab
|
||||||
|
this.switchTab(this.detailView!, 'general');
|
||||||
|
|
||||||
|
// Trigger fade in
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
this.detailView!.classList.remove('view-fade-out');
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,8 +201,23 @@ export class EmployeesController {
|
||||||
*/
|
*/
|
||||||
private showListViewInternal(): void {
|
private showListViewInternal(): void {
|
||||||
if (this.listView && this.detailView) {
|
if (this.listView && this.detailView) {
|
||||||
this.detailView.style.display = 'none';
|
// Fade out detail view
|
||||||
this.listView.style.display = 'block';
|
this.detailView.classList.add('view-fade-out');
|
||||||
|
|
||||||
|
// After fade, switch views
|
||||||
|
setTimeout(() => {
|
||||||
|
this.detailView!.style.display = 'none';
|
||||||
|
this.detailView!.classList.remove('view-fade-out');
|
||||||
|
|
||||||
|
// Show list view with fade in
|
||||||
|
this.listView!.style.display = 'block';
|
||||||
|
this.listView!.classList.add('view-fade-out');
|
||||||
|
|
||||||
|
// Trigger fade in
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
this.listView!.classList.remove('view-fade-out');
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue