Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticketing updates #2610

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -12,9 +12,9 @@ import { List } from 'containers/List/List';
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 @@ -37,7 +37,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 @@ -46,6 +47,7 @@ const getColumns = ({ body, status, insertedAt, user, contact }: any) => ({
});

const columnStyles = [
styles.Id,
styles.Created,
styles.Label,
styles.Issue,
Expand Down Expand Up @@ -94,6 +96,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"
}
Loading