Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Jan 25, 2024
1 parent 996f964 commit 0ff5cc8
Show file tree
Hide file tree
Showing 37 changed files with 165 additions and 136 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

<br/>

[![App Store](https://img.shields.io/static/v1?label=App%20Store&message=Download&color=ff69b4)](https://apps.apple.com/us/app/tie-tracker/id1493399075)
[![Google Play](https://img.shields.io/static/v1?label=Google%20Play&message=Download&color=ff69b4)](https://play.google.com/store/apps/details?id=com.tietracker.app)
[![Website](https://img.shields.io/static/v1?label=Web&message=Open&color=success)](https://tietracker.com)
[![GitHub release](https://img.shields.io/github/release/peterpeterparker/tietracker/all?logo=GitHub)](https://github.com/peterpeterparker/tietracker/releases/latest)
[![App Store](https://img.shields.io/static/v1?label=App%20Store&message=Download&color=ff69b4)](https://apps.apple.com/us/app/tie-tracker/id1493399075)
[![Google Play](https://img.shields.io/static/v1?label=Google%20Play&message=Download&color=ff69b4)](https://play.google.com/store/apps/details?id=com.tietracker.app)
[![Website](https://img.shields.io/static/v1?label=Web&message=Open&color=success)](https://tietracker.com)
[![GitHub release](https://img.shields.io/github/release/peterpeterparker/tietracker/all?logo=GitHub)](https://github.com/peterpeterparker/tietracker/releases/latest)

</div>

## Table of contents
Expand Down
19 changes: 14 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -14,7 +14,10 @@
<meta name="twitter:site" content="@daviddalbusco" />
<meta name="twitter:creator" content="@daviddalbusco" />
<meta name="twitter:title" content="Tie Tracker" />
<meta name="twitter:description" content="A simple, open source and free time tracking app ⏱" />
<meta
name="twitter:description"
content="A simple, open source and free time tracking app ⏱"
/>
<meta
name="twitter:image:src"
content="https://tietracker.com/assets/meta/tietracker-meta.png"
Expand Down Expand Up @@ -96,7 +99,9 @@
font-weight: 300;
font-display: swap;
src: url('/assets/fonts/open-sans-v17-latin-300.eot'); /* IE9 Compat Modes */
src: local('Open Sans Light'), local('OpenSans-Light'),
src:
local('Open Sans Light'),
local('OpenSans-Light'),
url('/assets/fonts/open-sans-v17-latin-300.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */ url('/assets/fonts/open-sans-v17-latin-300.woff2') format('woff2'),
/* Super Modern Browsers */ url('/assets/fonts/open-sans-v17-latin-300.woff')
Expand All @@ -113,7 +118,9 @@
font-weight: 400;
font-display: swap;
src: url('/assets/fonts/open-sans-v17-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Open Sans Regular'), local('OpenSans-Regular'),
src:
local('Open Sans Regular'),
local('OpenSans-Regular'),
url('/assets/fonts/open-sans-v17-latin-regular.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */ url('/assets/fonts/open-sans-v17-latin-regular.woff2') format('woff2'),
/* Super Modern Browsers */ url('/assets/fonts/open-sans-v17-latin-regular.woff')
Expand All @@ -131,7 +138,9 @@
font-weight: 700;
font-display: swap;
src: url('/assets/fonts/open-sans-v17-latin-700.eot'); /* IE9 Compat Modes */
src: local('Open Sans Bold'), local('OpenSans-Bold'),
src:
local('Open Sans Bold'),
local('OpenSans-Bold'),
url('/assets/fonts/open-sans-v17-latin-700.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */ url('/assets/fonts/open-sans-v17-latin-700.woff2') format('woff2'),
/* Super Modern Browsers */ url('/assets/fonts/open-sans-v17-latin-700.woff')
Expand Down
2 changes: 1 addition & 1 deletion public/workers/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ self.onmessage = async ($event) => {
$event.data.currency,
$event.data.vat,
$event.data.i18n,
$event.data.signature
$event.data.signature,
);
} else if ($event && $event.data && $event.data.msg === 'backup-idb') {
await self.backupIdb();
Expand Down
2 changes: 1 addition & 1 deletion public/workers/billable.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ self.listInvoices = async (invoices, filterProjectId) => {
invoices,
projects,
clients,
filterProjectId
filterProjectId,
);

const results = reduceAllProjects(projectsWithInvoices);
Expand Down
8 changes: 4 additions & 4 deletions public/workers/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ self.onmessage = async ($event) => {
$event.data.client,
$event.data.i18n,
$event.data.type,
$event.data.signature
$event.data.signature,
);
}
};
Expand All @@ -35,7 +35,7 @@ self.export = async (
client,
i18n,
type,
signature
signature,
) => {
if (!invoices || invoices.length <= 0) {
self.postMessage(undefined);
Expand Down Expand Up @@ -63,7 +63,7 @@ self.export = async (
client,
i18n,
type,
signature
signature,
);

await updateBudget(results.invoices, filterProjectId, bill);
Expand All @@ -83,7 +83,7 @@ async function exportInvoices(
client,
i18n,
type,
signature
signature,
) {
const promises = [];

Expand Down
2 changes: 1 addition & 1 deletion public/workers/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ function loadProjects() {

resolve(result);
});
}
}
4 changes: 2 additions & 2 deletions public/workers/utils/utils.pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const initPdfColumns = (invoices, i18n, total) => {
index === 0
? firstColumnLength
: index < columns.length - 1
? columnLength
: lastColumnLength,
? columnLength
: lastColumnLength,
};
});

Expand Down
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ const App: React.FC<RootProps> = (props: RootProps) => {
<IonIcon src="/assets/icon/logo-grey.svg" aria-label="Tie Tracker logo" />
)}
<Translation ns="common">
{(t, {i18n}) => <IonLabel>{t('navigation.home')}</IonLabel>}
</Translation>
{(t, {i18n}) => <IonLabel>{t('navigation.home')}</IonLabel>}
</Translation>
</IonTabButton>
<IonTabButton tab="invoices" href="/invoices">
<IonIcon icon={card} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/week/WeekCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const WeekCharts: React.FC = () => {
},
],
};
})
}),
);
} else {
setData(undefined);
Expand Down
4 changes: 2 additions & 2 deletions src/components/projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Projects: React.FC<Props> = (props: Props) => {
const {t} = useTranslation('projects');

const projects: Project[] | undefined = useSelector(
(state: RootState) => state.activeProjects.projects
(state: RootState) => state.activeProjects.projects,
);
const task: Task | undefined = useSelector((state: RootState) => state.tasks.taskInProgress);
const settings: SettingsModel = useSelector((state: RootState) => state.settings.settings);
Expand Down Expand Up @@ -67,7 +67,7 @@ const Projects: React.FC<Props> = (props: Props) => {
<div>
{projects.map((project: Project) => {
const colorContrast: string = contrast(
project.data.client ? project.data.client.color : undefined
project.data.client ? project.data.client.color : undefined,
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/general/SettingsGeneral.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SettingsGeneral: React.FC<SettingsGeneralProps> = (props) => {

useEffect(() => {
setNotificationsOn(
props.settings.notifications !== undefined ? props.settings.notifications : false
props.settings.notifications !== undefined ? props.settings.notifications : false,
);
setBackup(props.settings.backup !== undefined ? props.settings.backup : true);
}, [props.settings]);
Expand Down
10 changes: 5 additions & 5 deletions src/components/settings/templates/SettingsTemplates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const SettingsTemplates: React.FC<SettingsDescriptionProps> = (props) => {
function openAddTemplate(
$event: React.MouseEvent | React.TouchEvent,
template: Template | undefined,
action: 'edit' | 'add'
action: 'edit' | 'add',
) {
if (reorder && action === 'edit') {
return;
Expand All @@ -105,14 +105,14 @@ const SettingsTemplates: React.FC<SettingsDescriptionProps> = (props) => {
}

const exist: boolean = templates.some(
(filteredTemplate: Template) => filteredTemplate.key === template.key
(filteredTemplate: Template) => filteredTemplate.key === template.key,
);

if (exist) {
setTemplates(
templates.map((filteredTemplate: Template) =>
filteredTemplate.key === template.key ? template : filteredTemplate
)
filteredTemplate.key === template.key ? template : filteredTemplate,
),
);
} else {
setTemplates([...templates, template]);
Expand All @@ -125,7 +125,7 @@ const SettingsTemplates: React.FC<SettingsDescriptionProps> = (props) => {
}

setTemplates(
templates.filter((filteredTemplate: Template) => filteredTemplate.key !== template.key)
templates.filter((filteredTemplate: Template) => filteredTemplate.key !== template.key),
);
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/summary/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Summary: React.FC<Props> = (props: Props) => {
hours: acc.hours + value.hours,
};
},
{...open}
{...open},
);

setOpen(openSum);
Expand All @@ -74,7 +74,7 @@ const Summary: React.FC<Props> = (props: Props) => {
<label>{t('billable')} </label>
{formatCurrency(
summary !== undefined ? summary.total.today.billable : undefined,
settings.currency.currency
settings.currency.currency,
)}
</IonCardTitle>
</IonCardHeader>
Expand All @@ -91,7 +91,7 @@ const Summary: React.FC<Props> = (props: Props) => {
<label>{t('billable')} </label>
{formatCurrency(
summary !== undefined ? summary.total.week.billable : undefined,
settings.currency.currency
settings.currency.currency,
)}
</IonCardTitle>
</IonCardHeader>
Expand Down Expand Up @@ -119,7 +119,7 @@ const Summary: React.FC<Props> = (props: Props) => {
<label>{t('billable')} </label>
{formatCurrency(
open !== undefined ? open.billable : undefined,
settings.currency.currency
settings.currency.currency,
)}
</IonCardTitle>
</IonCardHeader>
Expand Down
13 changes: 8 additions & 5 deletions src/components/tasks/Tasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const Tasks: React.FC<Props> = (props: Props) => {
const {t} = useTranslation('tasks');

const tasks: TaskItemStore[] | undefined = useSelector(
(state: RootState) => state.tasks.taskItems
(state: RootState) => state.tasks.taskItems,
);
const selecteDay: Date = useSelector((state: RootState) => state.tasks.taskItemsSelectedDate);

const projects: Project[] | undefined = useSelector(
(state: RootState) => state.activeProjects.projects
(state: RootState) => state.activeProjects.projects,
);

function openDatePicker() {
Expand Down Expand Up @@ -76,7 +76,8 @@ const Tasks: React.FC<Props> = (props: Props) => {
fill="outline"
color="medium"
size="small"
aria-label={t('entries.select_date')}>
aria-label={t('entries.select_date')}
>
{t('entries.select_date')}
</IonButton>

Expand All @@ -96,7 +97,8 @@ const Tasks: React.FC<Props> = (props: Props) => {
fill="outline"
color="medium"
size="small"
aria-label={t('entries.add_task')}>
aria-label={t('entries.add_task')}
>
{t('entries.add_task')}
</IonButton>
);
Expand All @@ -115,7 +117,8 @@ const Tasks: React.FC<Props> = (props: Props) => {
<>
<p
className="placeholder"
dangerouslySetInnerHTML={{__html: t(label, {selectedDate: format(selecteDay)})}}></p>
dangerouslySetInnerHTML={{__html: t(label, {selectedDate: format(selecteDay)})}}
></p>

<div className={styles.picker}>
<MobileDatePicker
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
document.getElementById('root'),
);

// If you want your app to work offline and load faster, you can change
Expand Down
4 changes: 2 additions & 2 deletions src/modals/client/CreateClientModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const CreateClientModal: React.FC<Props> = (props: Props) => {

function validateClientName() {
setValidClientName(
clientData !== undefined && clientData.name !== undefined && clientData.name.length >= 3
clientData !== undefined && clientData.name !== undefined && clientData.name.length >= 3,
);
}

Expand Down Expand Up @@ -246,7 +246,7 @@ const CreateClientModal: React.FC<Props> = (props: Props) => {
projectData.name !== undefined &&
projectData.name.length >= 3 &&
projectData.rate &&
projectData.rate.hourly >= 0
projectData.rate.hourly >= 0,
);
}

Expand Down
Loading

0 comments on commit 0ff5cc8

Please sign in to comment.