Skip to content

Commit 4ec4c2f

Browse files
authored
Merge pull request #656 from lazycipher/responsive-design
Responsive design for ticket system
2 parents 2224c8f + a249859 commit 4ec4c2f

File tree

8 files changed

+56
-17
lines changed

8 files changed

+56
-17
lines changed

src/user/Admin/Tickets/Filter/Filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class Filter extends Component {
346346
onHide={this.toggleModal}
347347
>
348348
<LoadingOverlay
349-
className="discussion"
349+
className="discussion_container"
350350
active={!!this.state.spinner}
351351
text={this.state.spinner}
352352
spinner={<ClockLoader color={"#1A73E8"} />}

src/user/Admin/Tickets/TicketContent/DataTableCustomStyles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const customStyles = {
22
table: {
33
style: {
4-
width: "87vw",
5-
height: "60vh",
4+
width: "auto",
5+
height: "auto",
66
},
77
},
88
header: {

src/user/Admin/Tickets/TicketContent/TicketContent.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ class TicketContent extends Component {
3636

3737
const columns = [
3838
{
39-
name: "",
4039
grow: 5,
4140
selector: "title",
41+
minWidth: '150px',
4242
cell: (row) => <CustomTitle row={row} />,
4343
},
4444
{
4545
grow: 3,
46+
minWidth: '100px',
4647
cell: (row) =>
4748
row.tags.map((ele, index) => (
4849
<Badge
@@ -59,6 +60,7 @@ class TicketContent extends Component {
5960
name: "Created",
6061
sortable: true,
6162
selector: "createdAt",
63+
minWidth: '200px',
6264
cell: (row) => (
6365
<div style={{ display: "flex", alignItems: "center" }}>
6466
<Image
@@ -99,6 +101,7 @@ class TicketContent extends Component {
99101

100102
return (
101103
<DataTable
104+
responsive
102105
pagination
103106
columns={columns}
104107
highlightOnHover={true}

src/user/Admin/Tickets/TicketContent/TicketContent.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
.Ticket-dashboard-ticket{
1212
display: flex;
1313
align-items: center;
14+
width: 100%;
1415
.status {
1516
margin-right: 18px;
1617
}
@@ -19,4 +20,4 @@
1920
font-size: 1.1rem;
2021
font-family: Inter;
2122
}
22-
}
23+
}

src/user/Admin/Tickets/TicketDashboard.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
.ticket-content {
5353
flex: 10;
5454
}
55+
.discussion {
56+
margin-left: 0;
57+
}
5558
}
5659
}
5760
}
@@ -91,7 +94,17 @@
9194
@media (min-width: 320px) and (max-width: 1024px){
9295
.ticket{
9396
.ticket-details {
97+
width: 100%;
9498
margin-left: 0;
99+
padding: 2.5vh 2.5vw;
100+
.ticket-description {
101+
.discussion_container {
102+
flex-direction: column;
103+
}
104+
.ticket-content {
105+
width: 100%;
106+
}
107+
}
95108
}
96109
}
97110
}

src/user/Admin/Tickets/TicketDiscussion/Layout/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Layout extends Component {
6161
} = this.props;
6262
return (
6363
<LoadingOverlay
64-
className="discussion"
64+
className="discussion_container"
6565
active={!!spinner}
6666
text={spinner}
6767
spinner={<ClockLoader color={"#1A73E8"} />}

src/user/Admin/Tickets/TicketDiscussion/TicketDiscussion.scss

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.discussion {
1+
.discussion_container {
22
display: flex;
33
._loading_overlay_wrapper {
44
height: 100%;
@@ -50,22 +50,13 @@
5050
}
5151
}
5252
}
53-
.navigation {
54-
background: #f5f5f5;
55-
flex: 1;
56-
border-right: solid 1px #dfe9f1;
57-
position: fixed;
58-
top: 0px;
59-
bottom: 0px;
60-
left: 0px;
61-
overflow-y: scroll;
62-
}
6353
.ticket-discussion {
6454
flex: 4;
6555
border-right: solid 1px #dfe9f1;
6656
.discussion {
6757
display: flex;
6858
flex-direction: column;
59+
margin-left: 0;
6960
.discussion-title {
7061
display: flex;
7162
flex-grow: 0;
@@ -310,3 +301,29 @@
310301
}
311302
}
312303
}
304+
305+
306+
@media (min-width: 320px) and (max-width: 1024px){
307+
.discussion_container {
308+
.ticket-discussion {
309+
border-right: none;
310+
.discussion {
311+
flex-direction: column;
312+
#discussion-editor {
313+
margin: 2rem auto;
314+
}
315+
.discussion-title {
316+
.ticket-title {
317+
padding: 0;
318+
}
319+
}
320+
.single-discussion {
321+
margin: 0;
322+
}
323+
}
324+
}
325+
.ticket-info {
326+
margin-bottom:1rem;
327+
}
328+
}
329+
}

src/user/dashboard/navigation/navigation.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@
224224
}
225225
.hide-nav {
226226
transform: translateX(-105%);
227+
}
228+
.nav-container {
229+
position: sticky;
230+
top: 0;
231+
z-index: 1020;
227232
}
228233
.nav-container .navbar{
229234
display: block;

0 commit comments

Comments
 (0)