Fix: Theme change and issue in Appraisal

This commit is contained in:
Pranay 2025-01-10 12:55:31 +05:30
parent 934d40bdf1
commit ba0c21dbd7
3 changed files with 75 additions and 78 deletions

View File

@ -18,7 +18,8 @@ class AppraisalPeriod(models.Model):
@api.onchange('date_to') @api.onchange('date_to')
def onchange_activation_date(self): def onchange_activation_date(self):
for rec in self: for rec in self:
rec.activation_date = rec.date_to + timedelta(days=1) if rec.date_to:
rec.activation_date = rec.date_to + timedelta(days=1)
_defaults = { _defaults = {
'color_name': 'red', 'color_name': 'red',

View File

@ -1,89 +1,85 @@
.mk_apps_sidebar_panel { .mk_apps_sidebar_panel {
@include mk-disable-scrollbar(); @include mk-disable-scrollbar();
background-color: $mk-appbar-background; background-color: $mk-appbar-background;
width: var(--mk-sidebar-width, 0); width: var(--mk-sidebar-collapsed-width, 40px); /* Collapsed width: Icons only */
overflow-y: auto; overflow-y: auto;
transition: width 300ms ease; /* Smooth transition for width */
&:hover {
width: var(--mk-sidebar-expanded-width, 150px); /* Expanded width: Fits names */
}
.mk_apps_sidebar { .mk_apps_sidebar {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
white-space: nowrap; white-space: nowrap;
.mk_apps_sidebar_menu {
padding: 0; .mk_apps_sidebar_menu {
> li > a { padding: 0;
cursor: pointer;
font-size: 13px; > li > a {
font-weight: 300; cursor: pointer;
overflow: hidden; font-size: 13px;
padding: 8px 11px; font-weight: 300;
text-decoration: none; overflow: hidden;
color: $mk-appbar-color; padding: 8px 11px;
text-overflow: ellipsis; text-decoration: none;
.mk_apps_sidebar_icon { color: $mk-appbar-color;
width: 22px; text-overflow: ellipsis;
height: 22px;
margin-right: 5px; .mk_apps_sidebar_icon {
} width: 22px;
} height: 22px;
> li.active > a { margin-right: 5px;
}
.mk_apps_sidebar_name {
opacity: 0;
display: inline-block; /* Name stays inline with the icon */
margin-left: 5px; /* Spacing between icon and name */
transition: opacity 300ms ease;
white-space: nowrap;
}
}
> li.active > a {
background: $mk-appbar-active; background: $mk-appbar-active;
} }
> li:hover > a { > li:hover > a {
background: $mk-appbar-active; background: $mk-appbar-active;
} }
}
} > li > a .mk_apps_sidebar_name {
opacity: 1; /* All names visible on hover of the entire sidebar */
}
}
}
} }
.mk_sidebar_type_large { .mk_sidebar_type_large {
--mk-sidebar-width: #{$mk-sidebar-large-width}; --mk-sidebar-collapsed-width: 40px;
--mk-sidebar-expanded-width: 150px; /* Adjust this to match the names' width */
} }
.mk_sidebar_type_small { .mk_sidebar_type_small {
--mk-sidebar-width: #{$mk-sidebar-small-width}; --mk-sidebar-collapsed-width: 50px;
.mk_apps_sidebar_name { --mk-sidebar-expanded-width: 150px; /* Adjust if needed */
display: none;
} .mk_apps_sidebar_name {
.mk_apps_sidebar_icon { display: none;
margin-right: 0 !important; }
}
.mk_apps_sidebar_logo { .mk_apps_sidebar_icon {
display: none; margin-right: 0 !important;
} }
.mk_apps_sidebar_logo {
display: none;
}
} }
.mk_sidebar_type_invisible { .mk_sidebar_type_invisible {
--mk-sidebar-width: 0; --mk-sidebar-collapsed-width: 0;
} }
.editor_has_snippets_hide_backend_navbar,
.o_home_menu_background,
.o_fullscreen {
--mk-sidebar-width: 0;
}
.editor_has_snippets_hide_backend_navbar .mk_apps_sidebar_panel {
transition: width 300ms;
}
@include media-breakpoint-only(md) {
.mk_sidebar_type_large {
--mk-sidebar-width: #{$mk-sidebar-small-width};
.mk_apps_sidebar_name {
display: none;
}
.mk_apps_sidebar_icon {
margin-right: 0 !important;
}
.mk_apps_sidebar_logo {
display: none;
}
}
}
@include media-breakpoint-down(md) {
.mk_sidebar_type_large, .mk_sidebar_type_small {
--mk-sidebar-width: 0;
}
}