change matched table layout
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.87.0",
|
"version": "0.88.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"dev": "next dev -p 2999",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
@use './privacy-and-terms-pages.scss';
|
@use './privacy-and-terms-pages.scss';
|
||||||
@use './VKLogin.scss';
|
@use './VKLogin.scss';
|
||||||
@use './animation.scss';
|
@use './animation.scss';
|
||||||
|
@use './violation-details.scss';
|
||||||
|
|
||||||
.page-title {
|
.page-title {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
|||||||
@@ -4255,619 +4255,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.violation-details {
|
|
||||||
.page-title-color-frame {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.violation-page-icon {
|
|
||||||
width: 80px;
|
|
||||||
height: 80px;
|
|
||||||
border-radius: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 40px;
|
|
||||||
background: rgba(255, 255, 255, 0.2);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-page-info {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
border-bottom: 1px solid v.$border-color-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 12px 0;
|
|
||||||
border-bottom: 1px solid #f8fafc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-label {
|
|
||||||
color: #64748b;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-value {
|
|
||||||
color: #1e293b;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-source {
|
|
||||||
margin-top: 15px;
|
|
||||||
|
|
||||||
&-title {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #64748b;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.url-display {
|
|
||||||
background: #f8fafc;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid v.$border-color-1;
|
|
||||||
margin-top: 10px;
|
|
||||||
word-break: break-all;
|
|
||||||
|
|
||||||
.url-link {
|
|
||||||
color: #6366f1;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.notes-section {
|
|
||||||
background: #f8fafc;
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 12px;
|
|
||||||
margin-top: 15px;
|
|
||||||
border: 1px solid v.$border-color-1;
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
.notes-title {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #1e293b;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notes-content {
|
|
||||||
font-size: 13px;
|
|
||||||
color: #475569;
|
|
||||||
line-height: 1.6;
|
|
||||||
white-space: pre-line;
|
|
||||||
max-height: 200px;
|
|
||||||
overflow-y: auto;
|
|
||||||
text-align: left;
|
|
||||||
word-wrap: break-word;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats-mini-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
gap: 15px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
.stat-mini-card {
|
|
||||||
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 12px;
|
|
||||||
text-align: center;
|
|
||||||
border: 1px solid v.$border-color-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-mini-value {
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #1e293b;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-mini-label {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #64748b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-small {
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 600;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary-small {
|
|
||||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-secondary-small {
|
|
||||||
background: #f1f5f9;
|
|
||||||
color: #64748b;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: v.$border-color-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sources-list-wrapper {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 3fr;
|
|
||||||
gap: 10px;
|
|
||||||
height: 80vh;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
.sources-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 15px;
|
|
||||||
|
|
||||||
.source-card {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #f3f4f6;
|
|
||||||
border-radius: 20px;
|
|
||||||
box-shadow: 0 4px 20px #0000001a;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
padding: 15px;
|
|
||||||
height: calc(16vh - 12px);
|
|
||||||
cursor: pointer;
|
|
||||||
justify-content: space-between;
|
|
||||||
opacity: 0.75;
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
|
||||||
border-color: #cbd5e1;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.selected {
|
|
||||||
opacity: 1;
|
|
||||||
border: 1px solid #6366f1;
|
|
||||||
background: linear-gradient(180deg, #ffffff 0%, #e6eaf3 100%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: start;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
gap: 5px;
|
|
||||||
|
|
||||||
&-left {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-right {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-image {
|
|
||||||
max-height: 80%;
|
|
||||||
min-height: 50px;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
img {
|
|
||||||
position: relative !important;
|
|
||||||
height: 100% !important;
|
|
||||||
border-radius: 8px;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-url-block {
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-url {
|
|
||||||
color: #6366f1;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
word-break: break-all;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-meta {
|
|
||||||
gap: 15px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #64748b;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-actions {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sources-list-pagination {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.source-status {
|
|
||||||
padding: 4px 10px;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
&.new,
|
|
||||||
&.created {
|
|
||||||
background: v.$status-new;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.showed {
|
|
||||||
background-color: v.$b-color-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.legal_in_work,
|
|
||||||
&.complaint_in_work {
|
|
||||||
background: v.$status-in-work;
|
|
||||||
color: v.$white;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.authorized_use {
|
|
||||||
background: v.$authorized-use;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-action {
|
|
||||||
flex: 1;
|
|
||||||
width: 100%;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-weight: 600;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
font-size: 14px;
|
|
||||||
max-width: 300px;
|
|
||||||
|
|
||||||
&:disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-case {
|
|
||||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
||||||
color: white;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-success {
|
|
||||||
background: linear-gradient(135deg, #10b981, #059669);
|
|
||||||
color: white;
|
|
||||||
max-width: 200px;
|
|
||||||
padding: 6px 10px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .btn-warning {
|
|
||||||
background: linear-gradient(135deg, #f59e0b, #d97706);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-secondary {
|
|
||||||
background: linear-gradient(135deg, #64748b, #475569);
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 8px 20px rgba(100, 116, 139, 0.4);
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
.violation-info {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #f3f4f6;
|
|
||||||
border-radius: 20px;
|
|
||||||
box-shadow: 0 4px 20px #0000001a;
|
|
||||||
padding: 15px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 500px;
|
|
||||||
|
|
||||||
&-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 3fr 1fr;
|
|
||||||
gap: 10px;
|
|
||||||
flex-grow: 1;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-title {
|
|
||||||
border-bottom: 1px solid v.$border-color-1;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-image {
|
|
||||||
width: 300px;
|
|
||||||
height: 200px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-right-side {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-source {
|
|
||||||
span {
|
|
||||||
color: #64748b;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #6366f1;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-date-status {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.source-status {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-action {
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-actions {
|
|
||||||
border-left: 1px solid v.$border-color-1;
|
|
||||||
padding-left: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 300px auto;
|
|
||||||
gap: 10px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
|
|
||||||
border-bottom: 1px solid rgb(226, 232, 240);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* &-case-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 1fr 1fr;
|
|
||||||
gap: 5px;
|
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
overflow: auto;
|
|
||||||
} */
|
|
||||||
|
|
||||||
&-case {
|
|
||||||
padding: 10px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-bottom: 1px solid rgb(226, 232, 240);
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-choice {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-info-choice-buttons {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-tabs-wrapper {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.violation-info-choice {
|
|
||||||
padding: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-info-choice-buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: 16px;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-info-choice-btn {
|
|
||||||
padding: 12px 24px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: white;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-info-tab {
|
|
||||||
padding: 8px 16px;
|
|
||||||
border: none;
|
|
||||||
background: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-info-tab--active {
|
|
||||||
border-bottom: 2px solid blue;
|
|
||||||
color: blue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.violation-page-note {
|
|
||||||
margin-top: auto;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-form {
|
|
||||||
margin-top: 0;
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-textarea {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 80px;
|
|
||||||
padding: 12px;
|
|
||||||
border: 1px solid v.$border-color-1;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-family: inherit;
|
|
||||||
resize: vertical;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #f8fafc;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: none;
|
|
||||||
border-color: #6366f1;
|
|
||||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&-wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-form-flex {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-case-input {
|
|
||||||
border: 1px solid v.$border-color-1;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #f8fafc;
|
|
||||||
padding: 5px;
|
|
||||||
|
|
||||||
&::-webkit-outer-spin-button,
|
|
||||||
&::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: none;
|
|
||||||
border-color: #6366f1;
|
|
||||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&::placeholder {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-case-label {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note-form-group {
|
|
||||||
input {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.popular-questions {
|
.popular-questions {
|
||||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
|||||||
@@ -0,0 +1,806 @@
|
|||||||
|
@use './variable.scss' as v;
|
||||||
|
|
||||||
|
.violation-details {
|
||||||
|
.page-title-color-frame {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.violation-page-icon {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
border-radius: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 40px;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-page-info {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
border-bottom: 1px solid v.$border-color-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 0;
|
||||||
|
border-bottom: 1px solid #f8fafc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
color: #1e293b;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-source {
|
||||||
|
margin-top: 15px;
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #64748b;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-display {
|
||||||
|
background: #f8fafc;
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid v.$border-color-1;
|
||||||
|
margin-top: 10px;
|
||||||
|
word-break: break-all;
|
||||||
|
|
||||||
|
.url-link {
|
||||||
|
color: #6366f1;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-section {
|
||||||
|
background: #f8fafc;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-top: 15px;
|
||||||
|
border: 1px solid v.$border-color-1;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
.notes-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1e293b;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-content {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #475569;
|
||||||
|
line-height: 1.6;
|
||||||
|
white-space: pre-line;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
text-align: left;
|
||||||
|
word-wrap: break-word;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-mini-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.stat-mini-card {
|
||||||
|
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 12px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid v.$border-color-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-mini-value {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1e293b;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-mini-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-small {
|
||||||
|
padding: 6px 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary-small {
|
||||||
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary-small {
|
||||||
|
background: #f1f5f9;
|
||||||
|
color: #64748b;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: v.$border-color-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-list-wrapper {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 3fr;
|
||||||
|
gap: 10px;
|
||||||
|
height: 80vh;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.sources-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 15px;
|
||||||
|
|
||||||
|
.source-card {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #f3f4f6;
|
||||||
|
border-radius: 20px;
|
||||||
|
box-shadow: 0 4px 20px #0000001a;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
padding: 15px;
|
||||||
|
height: calc(16vh - 12px);
|
||||||
|
cursor: pointer;
|
||||||
|
justify-content: space-between;
|
||||||
|
opacity: 0.75;
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
||||||
|
border-color: #cbd5e1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.selected {
|
||||||
|
opacity: 1;
|
||||||
|
border: 1px solid #6366f1;
|
||||||
|
background: linear-gradient(180deg, #ffffff 0%, #e6eaf3 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
&-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-image {
|
||||||
|
max-height: 80%;
|
||||||
|
min-height: 50px;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
img {
|
||||||
|
position: relative !important;
|
||||||
|
height: 100% !important;
|
||||||
|
border-radius: 8px;
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-url-block {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-url {
|
||||||
|
color: #6366f1;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
word-break: break-all;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-meta {
|
||||||
|
gap: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #64748b;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-list-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-status {
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
|
&.new,
|
||||||
|
&.created {
|
||||||
|
background: v.$status-new;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.showed {
|
||||||
|
background-color: v.$b-color-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.legal_in_work,
|
||||||
|
&.complaint_in_work {
|
||||||
|
background: v.$status-in-work;
|
||||||
|
color: v.$white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.authorized_use {
|
||||||
|
background: v.$authorized-use;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-action {
|
||||||
|
flex: 1;
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 20px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
font-size: 14px;
|
||||||
|
max-width: 300px;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-case {
|
||||||
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||||
|
color: white;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-success {
|
||||||
|
background: linear-gradient(135deg, #10b981, #059669);
|
||||||
|
color: white;
|
||||||
|
max-width: 200px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.violation-info {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #f3f4f6;
|
||||||
|
border-radius: 20px;
|
||||||
|
box-shadow: 0 4px 20px #0000001a;
|
||||||
|
padding: 15px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 500px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
* {
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 3fr 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
flex-grow: 1;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
border-bottom: 1px solid v.$border-color-1;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-image-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-image {
|
||||||
|
width: 300px;
|
||||||
|
height: 200px;
|
||||||
|
position: relative;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-image-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 5px;
|
||||||
|
|
||||||
|
.image-btn {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #e2e8f0;
|
||||||
|
background: white;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #f1f5f9;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right-side {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-source {
|
||||||
|
span {
|
||||||
|
color: #64748b;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #6366f1;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-date-status {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.source-status {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-action {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-actions {
|
||||||
|
border-left: 1px solid v.$border-color-1;
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 300px auto;
|
||||||
|
gap: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
border-bottom: 1px solid rgb(226, 232, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-case {
|
||||||
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-choice {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-info-choice-buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
min-width: 180px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-tabs-wrapper {
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
|
||||||
|
.violation-info-choice {
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-info-choice-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-info-choice-btn {
|
||||||
|
padding: 12px 24px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: white;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-info-tab {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-info-tabs {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background: v.$bg-hover;
|
||||||
|
color: v.$text-p;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: linear-gradient(135deg, v.$p-color, v.$s-color);
|
||||||
|
color: v.$white;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.samples-wrapper {
|
||||||
|
max-width: 400px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
border-bottom: 1px solid v.$border-color-1;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samples-list {
|
||||||
|
overflow: auto;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-button {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.sample-item {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
border-bottom: 1px solid v.$border-color-1;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: v.$bg-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sample-item-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sample-item-text {
|
||||||
|
color: v.$text-s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.complaint-details {
|
||||||
|
&-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
color: v.$text-s;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-text {
|
||||||
|
color: v.$text-p;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.violation-page-note {
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-form {
|
||||||
|
margin-top: 0;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.button-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: end;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-textarea {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 80px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid v.$border-color-1;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: inherit;
|
||||||
|
resize: vertical;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #f8fafc;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #6366f1;
|
||||||
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-form-flex {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-case-input {
|
||||||
|
border: 1px solid v.$border-color-1;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #f8fafc;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
&::-webkit-outer-spin-button,
|
||||||
|
&::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #6366f1;
|
||||||
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::placeholder {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-case-label {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-form-group {
|
||||||
|
input {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.9);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 1000;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-modal-content {
|
||||||
|
position: relative;
|
||||||
|
max-width: 90vw;
|
||||||
|
max-height: 90vh;
|
||||||
|
cursor: default;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 90vh;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-modal-close {
|
||||||
|
position: absolute;
|
||||||
|
top: -40px;
|
||||||
|
right: 0;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
font-size: 32px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import { createComplaint, fetchComplainInfo } from '@/app/actions/violationActio
|
|||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
||||||
import { MatchStatus } from '@/app/actions/violationActions';
|
import { MatchStatus } from '@/app/actions/violationActions';
|
||||||
|
import {formatDate, formatDateTime} from '@/app/lib/formatDate';
|
||||||
|
|
||||||
interface complaintInfo {
|
interface complaintInfo {
|
||||||
id: number,
|
id: number,
|
||||||
@@ -26,8 +27,8 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const [showCreateCase, setShowCreateCase] = useState(false);
|
|
||||||
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
||||||
|
const [noteText, setNoteText] = useState('');
|
||||||
const [state, formAction, isPending] = useActionState(createComplaint, undefined);
|
const [state, formAction, isPending] = useActionState(createComplaint, undefined);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -59,8 +60,6 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
updateStatusHandler(selectedViolation.id, newStatus);
|
updateStatusHandler(selectedViolation.id, newStatus);
|
||||||
|
|
||||||
setShowCreateCase(false);
|
|
||||||
} else if (state && !state.success) {
|
} else if (state && !state.success) {
|
||||||
console.log(state.errorMessage);
|
console.log(state.errorMessage);
|
||||||
if (state.errorMessage?.server) {
|
if (state.errorMessage?.server) {
|
||||||
@@ -71,30 +70,18 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
}
|
}
|
||||||
}, [state, updateStatusHandler, selectedViolation.id]);
|
}, [state, updateStatusHandler, selectedViolation.id]);
|
||||||
|
|
||||||
function toggleForm() {
|
function templateHandler(e: React.MouseEvent<HTMLLIElement>) {
|
||||||
setShowCreateCase(!showCreateCase);
|
const sampleItemText = e.currentTarget.querySelector('.sample-item-text');
|
||||||
|
|
||||||
|
if (sampleItemText) {
|
||||||
|
const text = sampleItemText.textContent || '';
|
||||||
|
setNoteText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ENABLED_STATUSES.includes(localViolation.status)) {
|
if (!ENABLED_STATUSES.includes(localViolation.status)) {
|
||||||
return (
|
return (
|
||||||
<div className="violation-info-case">
|
<div className="violation-info-case">
|
||||||
{!showCreateCase ? (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn-action btn-case"
|
|
||||||
onClick={toggleForm}
|
|
||||||
>
|
|
||||||
{t('filing-complaint')}
|
|
||||||
</button>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn-action btn-case"
|
|
||||||
onClick={toggleForm}
|
|
||||||
>
|
|
||||||
{t('cancel')}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div className="note-form">
|
<div className="note-form">
|
||||||
<form action={formAction}>
|
<form action={formAction}>
|
||||||
@@ -102,11 +89,25 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
<textarea
|
<textarea
|
||||||
name="note"
|
name="note"
|
||||||
className="note-textarea"
|
className="note-textarea"
|
||||||
placeholder={`${t('text-of-the-complaint')}...`}>
|
placeholder={`${t('text-of-the-complaint')}...`}
|
||||||
|
value={noteText}
|
||||||
|
onChange={(e) => setNoteText(e.target.value)}
|
||||||
|
>
|
||||||
</textarea>
|
</textarea>
|
||||||
<div
|
<div
|
||||||
className="flex gap-3"
|
className="button-actions"
|
||||||
>
|
>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="btn-small btn-primary-small"
|
||||||
|
disabled={isPending}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Сохранить шаблон
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn-small btn-primary-small"
|
className="btn-small btn-primary-small"
|
||||||
@@ -134,9 +135,105 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className="samples-wrapper"
|
||||||
|
>
|
||||||
|
<h5>Шаблоны</h5>
|
||||||
|
|
||||||
|
<ul
|
||||||
|
className="samples-list"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
className="sample-item"
|
||||||
|
onClick={(e) => {
|
||||||
|
templateHandler(e)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="sample-item-title"
|
||||||
|
>
|
||||||
|
title 1
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="sample-item-text"
|
||||||
|
>
|
||||||
|
1text text text text text text text text text text text text
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className="sample-item"
|
||||||
|
onClick={(e) => {
|
||||||
|
templateHandler(e)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="sample-item-title"
|
||||||
|
>
|
||||||
|
title 2
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="sample-item-text"
|
||||||
|
>
|
||||||
|
2text text text text text text text text text text text text
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
className="sample-item"
|
||||||
|
onClick={(e) => {
|
||||||
|
templateHandler(e)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="sample-item-title"
|
||||||
|
>
|
||||||
|
title 3
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="sample-item-text"
|
||||||
|
>
|
||||||
|
3text text text text text text text text text text text text
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li
|
||||||
|
className="sample-item"
|
||||||
|
onClick={(e) => {
|
||||||
|
templateHandler(e)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="sample-item-title"
|
||||||
|
>
|
||||||
|
title 3
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="sample-item-text"
|
||||||
|
>
|
||||||
|
3text text text text text text text text text text text text
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li
|
||||||
|
className="sample-item"
|
||||||
|
onClick={(e) => {
|
||||||
|
templateHandler(e)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="sample-item-title"
|
||||||
|
>
|
||||||
|
title 3
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="sample-item-text"
|
||||||
|
>
|
||||||
|
3text text text text text text text text text text text text
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -162,17 +259,72 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
|||||||
{complainInfo.body.content.map((item: complaintInfo) => {
|
{complainInfo.body.content.map((item: complaintInfo) => {
|
||||||
return (
|
return (
|
||||||
<div key={item.id}>
|
<div key={item.id}>
|
||||||
<h3 className="mb-3">
|
|
||||||
{t('complaint-Information')}
|
|
||||||
</h3>
|
|
||||||
<div className="complaint-details">
|
<div className="complaint-details">
|
||||||
<p><strong>ID:</strong> {item.id}</p>
|
<div
|
||||||
<p><strong>{t('status')}:</strong> {item.status}</p>
|
className="complaint-details-item"
|
||||||
<p><strong>{t('text-of-the-complaint')}:</strong> {item.complaint_text}</p>
|
>
|
||||||
<p><strong>{t('violation-id')}:</strong> {item.violation_id}</p>
|
<strong>ID:</strong> {item.id}
|
||||||
<p><strong>{t('email')}:</strong> {item.email}</p>
|
</div>
|
||||||
<p><strong>{t('date-of-creation')}:</strong> {item.created_at}</p>
|
<div
|
||||||
<p><strong>{t('date-of-update')}:</strong> {item.updated_at}</p>
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('status')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.status}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('date-of-creation')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.created_at ? `${formatDate(item.created_at)}: ${formatDateTime(item.created_at)}` : '---'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('date-of-update')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.updated_at ? `${formatDate(item.updated_at)}: ${formatDateTime(item.updated_at)}` : '---'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('text-of-the-complaint')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.complaint_text}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ type UpdateStatusHandler = (id: number, status: MatchStatus) => Promise<boolean>
|
|||||||
export default function CaseViolation({ selectedViolation, updateStatusHandler }: { selectedViolation: ViolationFileDetail, updateStatusHandler: UpdateStatusHandler }) {
|
export default function CaseViolation({ selectedViolation, updateStatusHandler }: { selectedViolation: ViolationFileDetail, updateStatusHandler: UpdateStatusHandler }) {
|
||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const [showCreateCase, setShowCreateCase] = useState(false);
|
|
||||||
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
||||||
const [state, formAction, isPending] = useActionState(createCase, undefined);
|
const [state, formAction, isPending] = useActionState(createCase, undefined);
|
||||||
|
|
||||||
@@ -61,8 +60,6 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
updateStatusHandler(selectedViolation.id, newStatus);
|
updateStatusHandler(selectedViolation.id, newStatus);
|
||||||
|
|
||||||
setShowCreateCase(false);
|
|
||||||
} else if (state && !state.success) {
|
} else if (state && !state.success) {
|
||||||
console.log(state.errorMessage);
|
console.log(state.errorMessage);
|
||||||
if (state.errorMessage?.server) {
|
if (state.errorMessage?.server) {
|
||||||
@@ -73,31 +70,9 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
}
|
}
|
||||||
}, [state, updateStatusHandler, selectedViolation.id]);
|
}, [state, updateStatusHandler, selectedViolation.id]);
|
||||||
|
|
||||||
function toggleForm() {
|
|
||||||
setShowCreateCase(!showCreateCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ENABLED_STATUSES.includes(localViolation.status)) {
|
if (!ENABLED_STATUSES.includes(localViolation.status)) {
|
||||||
return (
|
return (
|
||||||
<div className="violation-info-case">
|
<div className="violation-info-case">
|
||||||
{!showCreateCase ? (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn-action btn-case"
|
|
||||||
onClick={toggleForm}
|
|
||||||
>
|
|
||||||
{t('create-case')}
|
|
||||||
</button>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn-action btn-case"
|
|
||||||
onClick={toggleForm}
|
|
||||||
>
|
|
||||||
{t('cancel')}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div className="note-form">
|
<div className="note-form">
|
||||||
<form action={formAction}>
|
<form action={formAction}>
|
||||||
<input type="hidden" name="violationId" value={localViolation.id} />
|
<input type="hidden" name="violationId" value={localViolation.id} />
|
||||||
@@ -111,7 +86,8 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
className="note-case-label"
|
className="note-case-label"
|
||||||
htmlFor="caseTitle"
|
htmlFor="caseTitle"
|
||||||
>
|
>
|
||||||
{t('case-name')}
|
{/* {t('case-name')} */}
|
||||||
|
Название претензии
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -197,7 +173,7 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
<div
|
<div
|
||||||
className="flex gap-3"
|
className="button-actions"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -210,8 +186,6 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (isLoadingCase) {
|
if (isLoadingCase) {
|
||||||
@@ -237,22 +211,124 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
|||||||
{caseInfo.body.content.map((item: CaseInfo) => {
|
{caseInfo.body.content.map((item: CaseInfo) => {
|
||||||
return (
|
return (
|
||||||
<div key={item.id}>
|
<div key={item.id}>
|
||||||
<h3 className="mb-3">
|
{/* <div className="complaint-details">
|
||||||
{t('complaint-Information')}
|
<div><strong>ID:</strong> {item.id}</div>
|
||||||
</h3>
|
<div><strong>{t('name')}:</strong>
|
||||||
<div className="complaint-details">
|
<br />
|
||||||
<p><strong>ID:</strong> {item.id}</p>
|
{item.name}
|
||||||
<p><strong>{t('name')}:</strong> {item.name}</p>
|
|
||||||
<p><strong>{t('description')}:</strong> {item.description}</p>
|
|
||||||
<p><strong>{t('amount')}:</strong> {item.amount}</p>
|
|
||||||
<p><strong>{t('priority')}:</strong> {item.priority}</p>
|
|
||||||
<p><strong>{t('type')}:</strong> {item.type}</p>
|
|
||||||
<p><strong>{t('lawyer')}:</strong> {item.lawyer || t('not-assigned')}</p>
|
|
||||||
<p><strong>{t('violation-id')}:</strong> {item.violationId}</p>
|
|
||||||
<p><strong>{t('date-of-creation')}:</strong> {item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}</p>
|
|
||||||
<p><strong>{t('date-of-update')}:</strong> {item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}</p>
|
|
||||||
{item.content && <p><strong>{t('content')}:</strong> {item.content}</p>}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div><strong>{t('description')}:</strong> {item.description}</div>
|
||||||
|
<div><strong>{t('amount')}:</strong> {item.amount}</div>
|
||||||
|
<div><strong>{t('priority')}:</strong> {item.priority}</div>
|
||||||
|
<div><strong>{t('type')}:</strong> {item.type}</div>
|
||||||
|
<div><strong>{t('lawyer')}:</strong> {item.lawyer || t('not-assigned')}</div>
|
||||||
|
<div><strong>{t('violation-id')}:</strong> {item.violationId}</div>
|
||||||
|
<div><strong>{t('date-of-creation')}:</strong> {item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}</div>
|
||||||
|
<div><strong>{t('date-of-update')}:</strong> {item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}</div>
|
||||||
|
{item.content && <p><strong>{t('content')}:</strong> {item.content}</p>}
|
||||||
|
</div> */}
|
||||||
|
|
||||||
|
|
||||||
|
<div className="complaint-details">
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<strong>ID:</strong> {item.id}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('status')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.type}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('date-of-creation')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('date-of-update')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.updatedAt ? `${formatDate(item.updatedAt)}: ${formatDateTime(item.updatedAt)}` : '---'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('description')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.description}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('amount-of-damage')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.amount}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="complaint-details-item"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="complaint-details-title"
|
||||||
|
>
|
||||||
|
{t('lawyer')}:
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
<span
|
||||||
|
className="complaint-details-text"
|
||||||
|
>
|
||||||
|
{item.lawyer}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
|||||||
<h4>Вы можете</h4>
|
<h4>Вы можете</h4>
|
||||||
<div className="violation-info-choice-buttons">
|
<div className="violation-info-choice-buttons">
|
||||||
<button
|
<button
|
||||||
className="violation-info-choice-btn"
|
className="btn btn-primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowTabs(true);
|
setShowTabs(true);
|
||||||
setActiveTab('complaint');
|
setActiveTab('complaint');
|
||||||
@@ -45,7 +45,7 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
className="violation-info-choice-btn"
|
className="btn btn-primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowTabs(true);
|
setShowTabs(true);
|
||||||
setActiveTab('legal');
|
setActiveTab('legal');
|
||||||
@@ -62,13 +62,13 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
|||||||
<div className="violation-info-tabs-wrapper">
|
<div className="violation-info-tabs-wrapper">
|
||||||
<div className="violation-info-tabs">
|
<div className="violation-info-tabs">
|
||||||
<button
|
<button
|
||||||
className={`violation-info-tab ${activeTab === 'complaint' ? 'violation-info-tab--active' : ''}`}
|
className={`btn btn-primary ${activeTab === 'complaint' ? 'active' : ''}`}
|
||||||
onClick={() => setActiveTab('complaint')}
|
onClick={() => setActiveTab('complaint')}
|
||||||
>
|
>
|
||||||
Жалоба
|
Жалоба
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`violation-info-tab ${activeTab === 'legal' ? 'violation-info-tab--active' : ''}`}
|
className={`btn btn-primary ${activeTab === 'legal' ? 'active' : ''}`}
|
||||||
onClick={() => setActiveTab('legal')}
|
onClick={() => setActiveTab('legal')}
|
||||||
>
|
>
|
||||||
Претензия
|
Претензия
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { toast } from 'sonner';
|
|||||||
import FilePageViolationEpmtyScreen from '@/app/ui/file-page/violation-table/file-page-violation-epmty-screen';
|
import FilePageViolationEpmtyScreen from '@/app/ui/file-page/violation-table/file-page-violation-epmty-screen';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import FilePageViolationInfoTabs from '@/app/ui/file-page/violation-table/file-page-violation-info-tabs';
|
import FilePageViolationInfoTabs from '@/app/ui/file-page/violation-table/file-page-violation-info-tabs';
|
||||||
|
import { createPortal } from 'react-dom';
|
||||||
|
|
||||||
export default function FilePageViolationInfo({ selectedViolation }: { selectedViolation: ViolationFileDetail | null }) {
|
export default function FilePageViolationInfo({ selectedViolation }: { selectedViolation: ViolationFileDetail | null }) {
|
||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
@@ -21,6 +22,13 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const [localViolation, setLocalViolation] = useState<ViolationFileDetail | null>(null);
|
const [localViolation, setLocalViolation] = useState<ViolationFileDetail | null>(null);
|
||||||
const [isUpdating, setIsUpdating] = useState(false);
|
const [isUpdating, setIsUpdating] = useState(false);
|
||||||
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
|
||||||
|
const openInNewTab = () => {
|
||||||
|
if (selectedViolation?.url) {
|
||||||
|
window.open(selectedViolation.url, '_blank');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLocalViolation(selectedViolation);
|
setLocalViolation(selectedViolation);
|
||||||
@@ -55,6 +63,11 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
}
|
}
|
||||||
}, [queryClient, selectedViolation]);
|
}, [queryClient, selectedViolation]);
|
||||||
|
|
||||||
|
const cleanUrlForDisplay = (url: string) => {
|
||||||
|
if (!url) return '#';
|
||||||
|
return url.split('?')[0];
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const updateStatus = async () => {
|
const updateStatus = async () => {
|
||||||
if (selectedViolation && (selectedViolation.status === 'CREATED' || selectedViolation.status === 'NEW')) {
|
if (selectedViolation && (selectedViolation.status === 'CREATED' || selectedViolation.status === 'NEW')) {
|
||||||
@@ -71,10 +84,30 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ImageModal = ({ src, alt, onClose }: { src: string; alt: string; onClose: () => void }) => {
|
||||||
|
return (
|
||||||
|
<div className="image-modal-overlay" onClick={onClose}>
|
||||||
|
<div className="image-modal-content" onClick={(e) => e.stopPropagation()}>
|
||||||
|
<button className="image-modal-close" onClick={onClose}>×</button>
|
||||||
|
<img src={src} alt={alt} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="violation-info"
|
className="violation-info"
|
||||||
>
|
>
|
||||||
|
{isModalOpen && createPortal(
|
||||||
|
<ImageModal
|
||||||
|
src={selectedViolation?.url || '/images/no-image.png'}
|
||||||
|
alt={selectedViolation?.page_title || 'Image'}
|
||||||
|
onClose={() => setIsModalOpen(false)}
|
||||||
|
/>,
|
||||||
|
document.body
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
className="violation-info-content"
|
className="violation-info-content"
|
||||||
>
|
>
|
||||||
@@ -87,6 +120,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
<div
|
<div
|
||||||
className="violation-info-header"
|
className="violation-info-header"
|
||||||
>
|
>
|
||||||
|
<div className="violation-info-image-wrapper">
|
||||||
<div
|
<div
|
||||||
className="violation-info-image"
|
className="violation-info-image"
|
||||||
>
|
>
|
||||||
@@ -102,6 +136,32 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="violation-info-image-buttons">
|
||||||
|
<button
|
||||||
|
className="image-btn image-btn-view"
|
||||||
|
onClick={() => setIsModalOpen(true)}
|
||||||
|
title="Увеличить"
|
||||||
|
>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||||
|
<circle cx="11" cy="11" r="8" />
|
||||||
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
||||||
|
<line x1="11" y1="8" x2="11" y2="14" />
|
||||||
|
<line x1="8" y1="11" x2="14" y2="11" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="image-btn image-btn-open"
|
||||||
|
onClick={openInNewTab}
|
||||||
|
title="Открыть в новой вкладке"
|
||||||
|
>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||||
|
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
||||||
|
<polyline points="15 3 21 3 21 9" />
|
||||||
|
<line x1="10" y1="14" x2="21" y2="3" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="violation-info-right-side"
|
className="violation-info-right-side"
|
||||||
@@ -118,7 +178,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
scroll={false}
|
scroll={false}
|
||||||
>
|
>
|
||||||
{selectedViolation?.page_url}
|
{selectedViolation?.page_url ? cleanUrlForDisplay(selectedViolation?.page_url) : selectedViolation?.page_url}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -409,12 +409,12 @@
|
|||||||
"type": "Тип",
|
"type": "Тип",
|
||||||
"lawyer": "Адвокат",
|
"lawyer": "Адвокат",
|
||||||
"not-assigned": "Не назначено",
|
"not-assigned": "Не назначено",
|
||||||
"create-case": "Создать дело",
|
"create-case": "Создать претензию",
|
||||||
"case-name": "Название дела",
|
"case-name": "Название претензии",
|
||||||
"amount-of-damage": "Сумма ущерба",
|
"amount-of-damage": "Сумма ущерба",
|
||||||
"text-of-the-case": "Текст дела",
|
"text-of-the-case": "Текст претензии",
|
||||||
"fill-text-of-the-case": "Заполните текст дела",
|
"fill-text-of-the-case": "Заполните текст претензии",
|
||||||
"fill-title-of-the-case": "Заполните название дела",
|
"fill-title-of-the-case": "Заполните название претензии",
|
||||||
"enter-the-amount-of-damage": "Введите сумму ущерба",
|
"enter-the-amount-of-damage": "Введите сумму ущерба",
|
||||||
"download-all": "Скачать все",
|
"download-all": "Скачать все",
|
||||||
"selected-files": "Выбрано файлов",
|
"selected-files": "Выбрано файлов",
|
||||||
|
|||||||
Reference in New Issue
Block a user