From 210a56c906099902f4a31fdd7639c5abc031175e Mon Sep 17 00:00:00 2001 From: japoodev Date: Sat, 19 Nov 2022 01:41:11 +0530 Subject: [PATCH 1/3] Fix #4 --- styles.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/styles.css b/styles.css index abc9c53..91c3f69 100644 --- a/styles.css +++ b/styles.css @@ -16,7 +16,7 @@ table { By default, when you set borders on table elements, they will look pretty ugly. */ border-collapse: collapse; - border: 3px solid purple; + border: 3px solid lightblue; } thead th:nth-child(1) { @@ -42,4 +42,5 @@ th, td { /* nth-child is a pretty neat thing to use and is widely applicable in real-life projects. Reader is highly encouraged to do more reading on this. */ tr:nth-child(1) { font-weight: bold; + background-color: lightblue; } \ No newline at end of file From 1448210d42e69760a9dd40ce072f10a397495ca9 Mon Sep 17 00:00:00 2001 From: japoodev Date: Sat, 19 Nov 2022 01:41:21 +0530 Subject: [PATCH 2/3] Fix #1 --- src/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index 853ebb5..42934a9 100644 --- a/src/constants.js +++ b/src/constants.js @@ -7,7 +7,7 @@ export const COMPANIES_API_PATH = "/companies"; export const COMPANIES_TABLE_HEADERS = ["Company Name", "Status", "Created At", "Revenue YTD", "Account Executive"]; -export const COMPANY_NAME_FIELD_NAME = "company_name"; +export const COMPANY_NAME_FIELD_NAME = "name"; export const STATUS_FIELD_NAME = "status"; export const CREATED_AT_FIELD_NAME = "created_at"; export const REVENUE_YTD_FIELD_NAME = "revenue_ytd"; From fe9ed9776384a11e129feb018a82fdcb27236544 Mon Sep 17 00:00:00 2001 From: japoodev Date: Sat, 19 Nov 2022 01:41:32 +0530 Subject: [PATCH 3/3] Fix #2 #3 --- src/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui.js b/src/ui.js index 5682dea..718643e 100644 --- a/src/ui.js +++ b/src/ui.js @@ -25,8 +25,8 @@ export const makeTable = async () => { row.push( company[COMPANY_NAME_FIELD_NAME], company[STATUS_FIELD_NAME], - company[CREATED_AT_FIELD_NAME], - company[REVENUE_YTD_FIELD_NAME], + company[CREATED_AT_FIELD_NAME].substring(11,16), + company[REVENUE_YTD_FIELD_NAME].toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "), company[ACCOUNT_EXECUTIVE_FIELD_NAME] ); companiesToDisplay.push(row);