This commit is contained in:
2026-06-19 17:21:07 +01:00
parent 25c3f1fa64
commit b093e1a90c
5 changed files with 1184 additions and 42 deletions
+113 -21
View File
@@ -685,7 +685,8 @@ footer {
max-height: calc(100vh - 48px) !important;
}
#dispenseModal.show {
#dispenseModal.show,
#disposeInventoryModal.show {
align-items: flex-start;
overflow-y: auto;
padding: 24px 0;
@@ -697,19 +698,22 @@ footer {
overflow-y: auto;
}
#dispenseForm {
#dispenseForm,
#disposeInventoryForm {
display: block;
padding-right: 6px;
}
#batchInfoSection,
#disposeBatchInfoSection,
#allocationPreviewSection {
max-height: 220px;
overflow-y: auto;
min-height: fit-content;
}
#dispenseModal .form-actions {
#dispenseModal .form-actions,
#disposeInventoryModal .form-actions {
margin-top: 16px;
padding-top: 14px;
background: var(--white);
@@ -1069,11 +1073,13 @@ footer {
max-height: calc(100vh - 24px);
}
#dispenseModal.show {
#dispenseModal.show,
#disposeInventoryModal.show {
padding: 12px 0;
}
#batchInfoSection,
#disposeBatchInfoSection,
#allocationPreviewSection {
max-height: 160px;
}
@@ -1195,22 +1201,29 @@ footer {
}
.user-management-content h3 {
margin-top: 20px;
margin-top: 0;
margin-bottom: 15px;
color: var(--primary-color);
}
.user-create-panel {
padding: 16px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: #f8fafc;
}
.user-management-content .form-row {
display: flex;
display: grid;
grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 0.8fr);
gap: 10px;
margin-bottom: 15px;
flex-wrap: wrap;
}
.user-management-content input,
.user-management-content select {
flex: 1;
min-width: 150px;
width: 100%;
min-width: 0;
padding: 10px;
border: 1px solid var(--border-color);
border-radius: 6px;
@@ -1222,33 +1235,103 @@ footer {
}
.users-list {
margin-top: 20px;
margin-top: 24px;
}
.users-table {
display: flex;
flex-direction: column;
gap: 10px;
gap: 8px;
}
.user-item {
display: flex;
justify-content: space-between;
display: grid;
grid-template-columns: minmax(140px, 1fr) minmax(110px, auto) minmax(170px, 0.8fr) minmax(190px, auto);
align-items: center;
padding: 12px;
background: #f8f9fa;
padding: 12px 14px;
background: var(--white);
border: 1px solid var(--border-color);
border-radius: 6px;
gap: 15px;
border-radius: 8px;
gap: 12px;
}
.user-identity {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.user-identity strong {
overflow-wrap: anywhere;
}
.current-user-label,
.self-note {
color: #64748b;
font-size: 0.85em;
}
.current-user-label {
padding: 2px 8px;
border-radius: 999px;
background: #e2e8f0;
color: #334155;
}
.admin-badge {
padding: 4px 12px;
background: var(--warning-color);
justify-self: start;
padding: 5px 10px;
color: var(--white);
border-radius: 20px;
font-size: 0.9em;
border-radius: 999px;
font-size: 0.85em;
font-weight: 500;
white-space: nowrap;
}
.admin-badge.role-admin {
background: var(--warning-color);
}
.admin-badge.role-user {
background: var(--secondary-color);
}
.admin-badge.role-readonly {
background: #64748b;
}
.role-control {
display: flex;
align-items: center;
gap: 8px;
}
.role-control span {
color: #64748b;
font-size: 0.85em;
}
.role-control select {
margin: 0;
}
.role-control select:disabled {
color: #64748b;
background: #f1f5f9;
cursor: not-allowed;
}
.user-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.user-actions .btn {
margin-bottom: 0;
}
/* Responsive Styles */
@@ -1278,6 +1361,15 @@ footer {
max-width: none;
}
.user-management-content .form-row,
.user-item {
grid-template-columns: 1fr;
}
.user-actions {
justify-content: flex-start;
}
.drug-item {
flex-direction: column;
}