Skip to content

change invoice to act of completed work #45

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Github Pages
on:
push:
branches: ['master']
branches: ['main']
workflow_dispatch:

permissions:
Expand Down
17 changes: 17 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"files": {
"main.css": "/react-invoice-generator/static/css/main.99ab4b19.css",
"main.js": "/react-invoice-generator/static/js/main.6907655c.js",
"service-worker.js": "/react-invoice-generator/service-worker.js",
"static/media/download.svg": "/react-invoice-generator/static/media/download.18bbd42e6b29fac26103.svg",
"index.html": "/react-invoice-generator/index.html",
"static/media/resize.svg": "/react-invoice-generator/static/media/resize.f719defd23407ef1b1e1.svg",
"static/media/remove.svg": "/react-invoice-generator/static/media/remove.ecaaf36889311f12afc4.svg",
"main.99ab4b19.css.map": "/react-invoice-generator/static/css/main.99ab4b19.css.map",
"main.6907655c.js.map": "/react-invoice-generator/static/js/main.6907655c.js.map"
},
"entrypoints": [
"static/css/main.99ab4b19.css",
"static/js/main.6907655c.js"
]
}
Binary file added build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/react-invoice-generator/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="React Invoice Generator allows you quickly make invoices and save them as PDF"/><link rel="apple-touch-icon" href="/react-invoice-generator/logo192.png"/><link rel="manifest" href="/react-invoice-generator/manifest.json"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600&display=swap"/><title>React Invoice Generator</title><script defer="defer" src="/react-invoice-generator/static/js/main.6907655c.js"></script><link href="/react-invoice-generator/static/css/main.99ab4b19.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Binary file added build/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "Invoice Generator",
"name": "React Invoice Generator",
"icons": [
{
"src": "favicon.ico",
"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": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
21 changes: 21 additions & 0 deletions build/pdf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
2 changes: 2 additions & 0 deletions build/service-worker.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/service-worker.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions build/static/css/main.99ab4b19.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/css/main.99ab4b19.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions build/static/js/main.6907655c.js

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions build/static/js/main.6907655c.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @preserve Knuth and Plass line breaking algorithm in JavaScript
*
* Licensed under the new BSD License.
* Copyright 2009-2010, Bram Stein
* All rights reserved.
*/

/** @license React v0.17.0
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v0.23.0
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions build/static/js/main.6907655c.js.map

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions build/static/media/download.18bbd42e6b29fac26103.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/remove.ecaaf36889311f12afc4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/resize.f719defd23407ef1b1e1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Invoice Generator</title>
<link rel="preconnect" href="https://fonts.bunny.net" />
<link href="https://fonts.bunny.net/css?family=nunito:400,600" rel="stylesheet" />
<link href="https://fonts.bunny.net/css?family=inter:400,600" rel="stylesheet" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/public/manifest.json" />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"homepage": "https://tuanpham-dev.github.io/react-invoice-generator/",
"scripts": {
"dev": "vite",
"dev": "vite --port 4000",
"build": "tsc && vite build",
"lint": "prettier -c .",
"lint:write": "prettier -w .",
Expand Down
10 changes: 8 additions & 2 deletions src/components/DownloadPDF.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ const Download: FC<Props> = ({ data, setData }) => {
const blob = new Blob([JSON.stringify(debounced)], {
type: 'text/plain;charset=utf-8',
})
FileSaver(blob, title + '.template')
FileSaver(blob, templateName + '.template')
}

const title = data.invoiceTitle ? data.invoiceTitle.toLowerCase() : 'invoice'
const now = new Date();
const formattedDate = `${String(now.getDate()).padStart(2, '0')}_${String(now.getMonth() + 1).padStart(2, '0')}_${now.getFullYear()}`;
const title = (data.title ? data.title.toLowerCase().replace(/\s+/g, '_') : 'invoice') + '_' + formattedDate;

const templateName = (data.clientName ? data.clientName.toLowerCase().replace(/\s+/g, '_') : 'client');


return (
<div className={'download-pdf '}>
<PDFDownloadLink
Expand Down
4 changes: 2 additions & 2 deletions src/components/EditableCalendarInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const EditableCalendarInput: FC<Props> = ({ className, value, selected, onChange
<Text style={compose('span ' + (className ? className : ''))}>{value}</Text>
) : (
<DatePicker
className={'input ' + (className ? className : '')}
className={'input ' + (className ? className : 'flex-item')}
selected={selected}
onChange={onChange ? (date) => onChange(date) : () => null}
dateFormat="MMM dd, yyyy"
dateFormat="dd.MM.yyyy"
/>
)}
</>
Expand Down
Loading