Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/glific/glific-frontend in…
Browse files Browse the repository at this point in the history
…to feature/export-tickets
  • Loading branch information
mdshamoon committed Nov 6, 2023
2 parents 6072c1a + 57930d5 commit 1816c42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/containers/Ticket/TicketList/TicketList.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
font-size: 16px;
}

.EndDate {
min-width: 110px;
width: 15%;
.Id {
width: 100px;
}

.Created {
Expand Down Expand Up @@ -86,6 +85,7 @@
color: #93a29b;
line-height: 1.25;
margin: 0;
word-break: break-all;
}

.Filters {
Expand Down
7 changes: 5 additions & 2 deletions src/containers/Ticket/TicketList/TicketList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { DialogBox } from 'components/UI/DialogBox/DialogBox';
import Ticket from 'containers/Ticket/Ticket';
import { Dropdown } from 'components/UI/Form/Dropdown/Dropdown';
import { getUserSession } from 'services/AuthService';

import styles from './TicketList.module.css';

const getId = (id: any) => <div className={styles.TableText}>{id}</div>;
const getBody = (body: any) => <div className={styles.TableText}>{body}</div>;
const getInsertedAt = (insertedAt: string) => (
<div className={styles.TableText}>{moment(insertedAt).format('DD-MM-YYYY hh:mm')}</div>
Expand All @@ -40,7 +40,8 @@ const getStatus = (status: string) => {

const getUser = (user: any) => <div className={styles.TableText}>{user?.name}</div>;

const getColumns = ({ body, status, insertedAt, user, contact }: any) => ({
const getColumns = ({ id, body, status, insertedAt, user, contact }: any) => ({
ticketId: getId(id),
insertedAt: getInsertedAt(insertedAt),
body: getBody(body),
contact: getUser(contact),
Expand All @@ -49,6 +50,7 @@ const getColumns = ({ body, status, insertedAt, user, contact }: any) => ({
});

const columnStyles = [
styles.Id,
styles.Created,
styles.Label,
styles.Issue,
Expand Down Expand Up @@ -112,6 +114,7 @@ export const TicketList = () => {
}

const columnNames: any = [
{ name: 'id', label: t('ID') },
{ name: 'inserted_at', label: t('Created at'), sort: true, order: 'desc' },
{ name: 'body', label: t('Issue') },
{ label: t('Opened by') },
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,5 +433,6 @@
"Request header": "Request header",
"Request JSON": "Request JSON",
"Response JSON": "Response JSON",
"Webhook Logs": "Webhook Logs"
"Webhook Logs": "Webhook Logs",
"ID": "ID"
}

0 comments on commit 1816c42

Please sign in to comment.