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

misc fixes #184

Merged
merged 2 commits into from
Feb 7, 2024
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
4 changes: 2 additions & 2 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/wato.jpeg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -28,7 +28,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>WATO Finance System</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
16 changes: 3 additions & 13 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -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": ".",
Expand Down
Binary file added frontend/public/wato.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -25,7 +26,7 @@ const TicketContentTableRow = ({ heading, value, onChange, type }) => {
{onChange ? (
<Input onChange={onChange} value={value} />
) : type === 'URL' ? (
<Link color="blue.500" href={value} isExternal>
<Link color="blue.500" href={addhttps(value)} isExternal>
{value}
</Link>
) : (
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading