From 383684590281cdc85b639160bbfd2258297e3e4b Mon Sep 17 00:00:00 2001 From: Victor Zheng Date: Sun, 21 Jan 2024 20:32:06 -0800 Subject: [PATCH 1/2] misc fixes --- frontend/public/index.html | 4 ++-- frontend/public/manifest.json | 16 +++------------- frontend/public/wato.jpeg | Bin 0 -> 6749 bytes .../TicketContent/TicketContentTableRow.js | 3 ++- 4 files changed, 7 insertions(+), 16 deletions(-) create mode 100644 frontend/public/wato.jpeg diff --git a/frontend/public/index.html b/frontend/public/index.html index 907eff8..2b2c749 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -2,7 +2,7 @@ - + - React App + WATO Finance System diff --git a/frontend/public/manifest.json b/frontend/public/manifest.json index f01493f..ffecb77 100644 --- a/frontend/public/manifest.json +++ b/frontend/public/manifest.json @@ -1,21 +1,11 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "Finance", + "name": "WATO Finance System", "icons": [ { - "src": "favicon.ico", + "src": "wato.jpeg", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" } ], "start_url": ".", diff --git a/frontend/public/wato.jpeg b/frontend/public/wato.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1b978a2b25ace44b26d11158491615b0ab47cf25 GIT binary patch literal 6749 zcmbVQc{tSF+y4&6&LksC_I-#fg9tNdEMuLags70r*s_&`v1DoN`%)Oo7;6$z@~C7> zk8BfBAt6g;h#E`gou1$C{ax>$@B5zXnltBn-RGS9^EvnZz0b^t@s9BxxD9Z!vvaV6 zIXO5uxVSjEd7*r~JUqOjM+G5J2{9>22{CbTX?b-eY1tEU;^NABuoD`Za5!8_N#E#{ zmZ7>fTnog-#l_3RE5gSoq9r3PqxFAojOTy=CrAV&!U~cFSOh?<0w6{&s1g7`V9-Ae z_;&-bu(E;KIXJnvd5!=qAXZiuHdZj0jg2`onrQ>r1i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eb6N-SUf)kSNL5jvBrhD%$sku(#-qp;XNzbm7Yk%Y6pIoqX?jLFiyxoQJG#8y zIjCy`|A_^w=qVwY-!t>!B#_9fb&RI`;wV$W9LFldnCf0Evvy*sa!dt^nq=u(WXm>T zRWFUjB^APpt2Ox$-<6(JSZs==-wh_|9leXj!JurxR%oUKib08zJZZjt3Q$gcXk~hT z;k9iN8<{*b9-qg(z?x8k89_S?oyP8##m5R^GTRaOle79d0@saJhFMzWaaJO%EO%|m zq;toJ=#V=6CFxhEB=8PwUP?`h=QP*wTGryrajcqNRwxCTLJo^*%Whf;XcK>tafK#y;?PG4js>)Gvv<$PG5~1ud2++HnBE`DFe*BvAH~%Q;-V> zu**4V4lH9RD8OVsDox=IfC6i-z7()x96Qe39_>I1hd+J(3B~ewJ~pI3DK|~c{Crsr zk)>xjZ5-1FK(QEP57A}}34-Tg9W*UwrCduY{s6)wHCQ4YAJn~CoUq;twpA=@RMiY3 zD=6Y%yxM561QSGcCDDspxthd6RIX;~)efMN3*#6Yj$jMPwmb)!57;GKUK{XjmKq43 zQ5H(}A)=KB8%tyvOoCE13ZBt}xIamvy@3X1h*Q2U%&#wfUXxx<|}M OEPoaA3KvE&rvD3MMNG{A literal 0 HcmV?d00001 diff --git a/frontend/src/components/TicketContent/TicketContentTableRow.js b/frontend/src/components/TicketContent/TicketContentTableRow.js index b7369a9..b45ef06 100644 --- a/frontend/src/components/TicketContent/TicketContentTableRow.js +++ b/frontend/src/components/TicketContent/TicketContentTableRow.js @@ -25,7 +25,8 @@ const TicketContentTableRow = ({ heading, value, onChange, type }) => { {onChange ? ( ) : type === 'URL' ? ( - + // force absolute URL + {value} ) : ( From 46d358cec156d5f8dc16c7fba32eb25d7fafc1c7 Mon Sep 17 00:00:00 2001 From: Victor Zheng Date: Mon, 5 Feb 2024 22:08:39 -0800 Subject: [PATCH 2/2] address comments --- .../src/components/TicketContent/TicketContentTableRow.js | 4 ++-- frontend/src/utils/utils.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/TicketContent/TicketContentTableRow.js b/frontend/src/components/TicketContent/TicketContentTableRow.js index b45ef06..0965f9d 100644 --- a/frontend/src/components/TicketContent/TicketContentTableRow.js +++ b/frontend/src/components/TicketContent/TicketContentTableRow.js @@ -1,5 +1,6 @@ import React from 'react' import { Input, Td, Th, Tr, Link } from '@chakra-ui/react' +import { addhttps } from '../../utils/utils' const TicketContentTableRow = ({ heading, value, onChange, type }) => { return ( @@ -25,8 +26,7 @@ const TicketContentTableRow = ({ heading, value, onChange, type }) => { {onChange ? ( ) : type === 'URL' ? ( - // force absolute URL - + {value} ) : ( diff --git a/frontend/src/utils/utils.js b/frontend/src/utils/utils.js index 4bdfd45..9a59a65 100644 --- a/frontend/src/utils/utils.js +++ b/frontend/src/utils/utils.js @@ -41,3 +41,11 @@ export const getFormattedCurrency = (currencyStr) => { }) return `CAD ${currencyFormatter.format(currencyStr)}` } + +// adds https protocol if the url doesnt contain it +export const addhttps = (url) => { + if (!/^(?:f|ht)tps?:\/\//.test(url)) { + url = 'https://' + url + } + return url +}