add tariff table, add edit tariff modal window

This commit is contained in:
smanylov
2026-05-29 18:43:37 +07:00
parent 96808c4a12
commit 8928960c34
7 changed files with 900 additions and 164 deletions
+105 -90
View File
@@ -2,6 +2,7 @@
@use './edit-permissions-modal.scss';
@use './animation.scss';
@use './file-moderation-modal.scss';
@use './tariff-edit-modal.scss';
:root {
--primary-color: #2563eb;
@@ -528,13 +529,27 @@
}
.stat-card-title {
font-size: 13px;
font-size: 14px;
color: var(--text-secondary);
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stat-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
}
.tariff-term-badge {
background: #eff6ff;
padding: 2px 12px;
border-radius: 8px;
font-size: 11px;
}
.stat-card-value {
/* width: 40px; */
width: auto;
@@ -786,95 +801,6 @@
}
}
.tanstak-table-pagination {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
margin-top: 1.5rem;
gap: 1rem;
@media (min-width: 768px) {
flex-direction: row;
}
.pagination-info {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
&-pages {
color: v.$text-p;
}
&-files {
color: v.$text-s;
}
}
.pagination-controls {
display: flex;
align-items: center;
gap: 0.5rem;
.arrow {
padding-left: 0.5rem;
padding-right: 0.5rem;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
border: 2px solid v.$border-color-1;
border-radius: 10px;
box-shadow: 0 1px 2px #0000000d;
color: var(--primary-color);
.icon {
width: 18px;
}
/* */
&:hover {
background-color: v.$bg-light;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
&-pages {
display: flex;
align-items: center;
gap: 0.25rem;
button {
border: 2px solid v.$border-color-1;
padding: 0.25rem 0.75rem;
border-radius: 10px;
color: var(--primary-color);
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
&.current {
background-color: var(--primary-color);
color: v.$white;
}
&.other {
&:hover {
background-color: v.$bg-light;
}
}
}
}
}
}
.tanstak-table-block {
overflow-x: auto;
border-radius: 0.5rem;
@@ -1217,6 +1143,95 @@
}
}
.tanstak-table-pagination {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
margin-top: 1.5rem;
gap: 1rem;
@media (min-width: 768px) {
flex-direction: row;
}
.pagination-info {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
&-pages {
color: v.$text-p;
}
&-files {
color: v.$text-s;
}
}
.pagination-controls {
display: flex;
align-items: center;
gap: 0.5rem;
.arrow {
padding-left: 0.5rem;
padding-right: 0.5rem;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
border: 2px solid v.$border-color-1;
border-radius: 10px;
box-shadow: 0 1px 2px #0000000d;
color: var(--primary-color);
.icon {
width: 18px;
}
/* */
&:hover {
background-color: v.$bg-light;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
&-pages {
display: flex;
align-items: center;
gap: 0.25rem;
button {
border: 2px solid v.$border-color-1;
padding: 0.25rem 0.75rem;
border-radius: 10px;
color: var(--primary-color);
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
&.current {
background-color: var(--primary-color);
color: v.$white;
}
&.other {
&:hover {
background-color: v.$bg-light;
}
}
}
}
}
}
.empty-state {
text-align: center;
padding: 60px 20px;
+194
View File
@@ -0,0 +1,194 @@
@use './variable.scss' as v;
.tariff-edit-modal {
padding: 1.5rem;
min-width: 500px;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
&__title {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 1.5rem;
color: #111827;
}
&__content {
display: flex;
flex-direction: column;
gap: 1rem;
}
&__info-section {
border-bottom: 1px solid #e5e7eb;
padding-bottom: 0.75rem;
&:last-of-type {
border-bottom: none;
}
}
&__label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
margin-bottom: 0.5rem;
}
&__value {
color: #111827;
word-break: break-word;
font-size: 0.875rem;
}
&__input {
width: 100%;
padding: 0.5rem;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
font-size: 0.875rem;
font-family: inherit;
color: #111827;
background-color: #ffffff;
transition: all 0.2s;
&:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
&::placeholder {
color: #9ca3af;
}
&:disabled {
background-color: #f3f4f6;
cursor: not-allowed;
}
&[type="number"] {
-moz-appearance: textfield;
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
display: none;
}
}
}
&__textarea {
width: 100%;
padding: 0.5rem;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
font-size: 0.875rem;
font-family: inherit;
color: #111827;
background-color: #ffffff;
resize: vertical;
transition: all 0.2s;
&:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
&::placeholder {
color: #9ca3af;
}
&:disabled {
background-color: #f3f4f6;
cursor: not-allowed;
}
}
&__actions {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
}
// Стили для DropDownList внутри модального окна
.dropdown {
width: 100%;
}
}
// Адаптация для мобильных устройств
@media (max-width: 768px) {
.tariff-edit-modal {
min-width: 90vw;
padding: 1rem;
&__title {
font-size: 1.25rem;
margin-bottom: 1rem;
}
&__info-section {
padding-bottom: 0.5rem;
}
&__actions {
flex-direction: column-reverse;
button {
width: 100%;
}
}
}
}
// Стили для скроллбара (опционально)
.tariff-edit-modal {
scrollbar-width: thin;
scrollbar-color: #cbd5e1 #f1f5f9;
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: #f1f5f9;
border-radius: 3px;
}
&::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
&:hover {
background: #94a3b8;
}
}
}
.tariff-edit-modal__row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
@media (max-width: 768px) {
grid-template-columns: 1fr;
gap: 0.75rem;
}
}
.tariff-edit-modal__info-section--half {
@extend .tariff-edit-modal__info-section;
@media (min-width: 769px) {
&:first-child {
padding-right: 0.5rem;
}
&:last-child {
padding-left: 0.5rem;
}
}
}