Code Monkey home page Code Monkey logo

ui's Introduction

Sublime's custom image

v5-develop phpunit Codacy Badge CLA assistant

Invoice Ninja 5

Join us on Slack, Discord, Support Forum

Introduction

Version 5 of Invoice Ninja is here! We took the best parts of version 4 and add the most requested features to produce a invoicing application like no other.

All Pro and Enterprise features from the hosted app are included in the open code. We offer a $30 per year white-label license to remove the Invoice Ninja branding from client facing parts of the app.

Setup

Mobile Apps

Desktop Apps

Installation Options

Recommended Providers

Quick Hosting Setup

git clone --single-branch --branch v5-stable https://github.com/invoiceninja/invoiceninja.git
cp .env.example .env
composer i -o --no-dev
php artisan key:generate

Please Note: Your APP_KEY in the .env file is used to encrypt data, if you lose this you will not be able to run the application.

Run if you want to load sample data, remember to configure .env

php artisan migrate:fresh --seed && php artisan db:seed && php artisan ninja:create-test-data

To run the web server

php artisan serve 

Navigate to (replace localhost with the appropriate domain)

http://localhost:8000/setup - To setup your configuration if you did not load sample data.
http://localhost:8000/ - For Administrator Logon

user: [email protected]
pass: password

http://localhost:8000/client/login - For Client Portal

user: [email protected]
pass: password

Developers Guide

App Design

The API and client portal have been developed using Laravel if you wish to contribute to this project familiarity with Laravel is essential.

When inspecting functionality of the API, the best place to start would be in the routes/api.php file which describes all of the availabe API endpoints. The controller methods then describe all the entry points into each domain of the application, ie InvoiceController / QuoteController

The average API request follows this path into the application.

  • Middleware processes the request initially inspecting the domain being requested + provides the authentication layer.
  • The request then passes into a Form Request (Type hinted in the controller methods) which is used to provide authorization and also validation of the request. If successful, the request is then passed into the controller method where it is digested, here is an example:
public function store(StoreInvoiceRequest $request)
{

    $invoice = $this->invoice_repo->save($request->all(), InvoiceFactory::create(auth()->user()->company()->id, auth()->user()->id));

    $invoice = $invoice->service()
                        ->fillDefaults()
                        ->triggeredActions($request)
                        ->adjustInventory()
                        ->save();

    event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));

    return $this->itemResponse($invoice);

}

Here for example we are storing a new invoice, we pass the validated request along with a factory into the invoice repository where it is processed and saved.

The returned invoice then passes through its service class (app/Services/Invoice) where various actions are performed.

A event is then fired which notifies listeners in the application (app/Providers/EventServiceProvider) which perform non blocking sub tasks

Finally the invoice is transformed (app/Transformers/) and returned as a response via Fractal.

Developer environment

Using the Quick Hosting Setup describe above you can quickly get started building out your development environment. Instead of using

composer i -o --no-dev

use

composer i -o

This provides the developer tools including phpunit which allows the test suite to be run.

If you are considering contributing back to the main repository, please add in any tests for new functionality / modifications. This will greatly increase the chances of your PR being accepted

Also, if you plan any additions for the main repository, you may want to discuss this with us first on Slack where we can assist with any technical information and provide advice.

Credits

Security

If you find a security issue with this application, please send an email to [email protected]. Please follow responsible disclosure procedures if you detect an issue. For further information on responsible disclosure please read here.

License

Invoice Ninja is released under the Elastic License.
See LICENSE for details.

ui's People

Contributors

beganovich avatar cirkan avatar civolilah avatar joshuadwire avatar notks avatar renovate[bot] avatar rschueler avatar stevro avatar theo-184 avatar turbo124 avatar zer0divis0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ui's Issues

Refresh invoice preview

In the Flutter interface (and v4) the PDF preview of the invoice refreshes when making changes. It doesn't seem to refresh in the React interface. Refreshing the page works, but having an auto-refresh would be handier.

Task details' "Status" field could indicate live running time and provide the Start / Stop / Resume button directly

v4's time tracker had this very nice "obvious in your face" indication that time is running in your current task, with an easy way to stop (or Resume) it with one click:

image

v5's task editor buries this into a menu, but particularly in the task's details / time records view, there would be a lot more space available to bring this functionality back:

image

I think that would make it more discoverable and readily accessible. It would also help prevent me from "forgetting to stop the clock" (which can happen quite often).

'Health Check' option missing from React admin UI

In the flutter UI there was a health check option when you clicked the (i) info icon in the bottom left of the admin interface. The health feature check is needed because it's referenced in a lot of the troubleshooting docs etc., please add it back to the React UI.

Invoice preview is not being updated properly.

Open Invoice from Client A
image

go to invoice list, open invoice from client B.
Check preview details.
image

in both invoices client is Client A.
running on docker-compose, - PDF is generated by SnapPDF, Self-hosted.

Settings - localization

Hi,
in the settings->localization the setting "first month of year" isn't populated. Even though the value is set.
image

Settings - client portal

Hi,
in the settings all client portal values are not set. On the main page the setting for the po-number and for an external store is missing.
image

The registration tab provides also wrong data:
old
image
new
image

Dashboard widgets do not refresh

Hi,

In React, on my Selfhost install, widgets are not refreshing as they should after some actions.

As an example, Past Due Invoices has not refreshed after entering a payment for a few invoices listed in this widget.

Browsing to another page and coming back to Dashboard did not help
Only after a hard refresh did theses now paid invoices were removed from this widget list.

IMO, it should not need a hard refresh to update these widget infos.

Dashboard wrong default currency

Hi there,
by default the new UI shows USD, instead of the companys main currency EUR.
image
Is there any chance to set the default currency to the currency with the largest number?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency @headlessui/tailwindcss to ^0.2.0
  • Update dependency @react-oauth/google to ^0.12.0
  • Update mariadb Docker tag to v10.11
  • Update actions/checkout action to v4
  • Update actions/setup-node action to v4
  • Update actions/upload-artifact action to v4
  • Update dependency @reduxjs/toolkit to v2
  • Update dependency @types/node to v20
  • Update dependency eslint-plugin-unused-imports to v3
  • Update dependency husky to v9
  • Update dependency i18next to v23
  • Update dependency prettier to v3
  • Update dependency react-datepicker to v6 (react-datepicker, @types/react-datepicker)
  • Update dependency react-i18next to v14
  • Update dependency react-icons to v5
  • Update dependency react-redux to v9
  • Update dependency react-verification-input to v4
  • Update mariadb Docker tag to v11
  • Update softprops/action-gh-release action to v2
  • Update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/analyse.yml
  • actions/checkout v3
  • actions/setup-node v3
.github/workflows/playwright.yml
  • shivammathur/setup-php v2
  • actions/upload-artifact v3
  • mariadb 10.6
.github/workflows/release.yml
  • actions/checkout v3
  • softprops/action-gh-release v1
npm
package.json
  • @azure/msal-browser ^3.0.1
  • @emotion/styled ^11.10.5
  • @headlessui/react ^1.7.4
  • @headlessui/tailwindcss ^0.1.3
  • @hello-pangea/dnd ^16.2.0
  • @monaco-editor/react ^4.4.6
  • @react-oauth/google ^0.9.0
  • @reduxjs/toolkit ^1.9.1
  • @sentry/react ^7.77.0
  • @sentry/tracing ^7.77.0
  • @tinymce/tinymce-react ^4.3.0
  • @tippyjs/react ^4.2.6
  • antd ^5.6.1
  • array-move ^4.0.0
  • axios ^0.27.2
  • classnames ^2.3.2
  • collect.js ^4.34.3
  • currency.js ^2.0.4
  • dayjs ^1.11.7
  • dotenv ^16.0.3
  • formik ^2.2.9
  • history ^5.3.0
  • i18next ^22.1.4
  • jotai ^2.0.3
  • lodash ^4.17.21
  • pretty-bytes ^6.0.0
  • react ^18.2.0
  • react-colorful ^5.6.1
  • react-date-range ^1.4.0
  • react-datepicker ^4.11.0
  • react-debounce-input ^3.3.0
  • react-dom ^18.2.0
  • react-dropzone ^14.2.3
  • react-feather ^2.0.10
  • react-hot-toast ^2.4.0
  • react-i18next ^12.1.1
  • react-icons ^4.7.1
  • react-json-tree ^0.18.0
  • react-phone-number-input ^3.2.23
  • react-qr-code ^2.0.8
  • react-query ^3.39.2
  • react-redux ^8.0.5
  • react-router-dom ^6.4.4
  • react-select ^5.7.0
  • react-string-replace ^1.1.0
  • react-turnstile ^1.1.2
  • react-use ^17.4.0
  • react-verification-input ^3.3.0
  • recharts ^2.1.16
  • remove ^0.1.5
  • styled-components ^6.0.7
  • tailwind-scrollbar ^3.0.0
  • uuid ^9.0.0
  • @faker-js/faker ^8.2.0
  • @playwright/test ^1.40.1
  • @tailwindcss/forms ^0.5.3
  • @types/jest ^29.2.4
  • @types/lodash ^4.14.191
  • @types/node ^18.11.11
  • @types/react ^18.0.26
  • @types/react-date-range ^1.4.4
  • @types/react-datepicker ^4.8.0
  • @types/react-dom ^18.0.9
  • @types/uuid ^9.0.0
  • @typescript-eslint/eslint-plugin ^5.45.1
  • @typescript-eslint/parser ^5.45.1
  • @vitejs/plugin-react ^3.0.0
  • autoprefixer ^10.4.13
  • eslint ^8.29.0
  • eslint-plugin-react ^7.31.11
  • eslint-plugin-unused-imports ^2.0.0
  • husky ^8.0.2
  • jest ^29.3.1
  • postcss ^8.4.19
  • prettier 2.8.8
  • tailwindcss ^3.2.4
  • ts-jest ^29.0.3
  • ts-node ^10.9.1
  • typescript ^4.9.3
  • vite ^4.2.0
  • vite-tsconfig-paths ^4.0.0
  • node >=16.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Missing Live PDF preview option.

in the Flutter version there is device settings section
image
and possible to disable Live PDF Preview
image
in React version I couldn't find it.

Settings - User Menu

Hi,
the advanced options menu in the user space has two options to remove a user. But only delete really removes it, while remove does nothing. After deleting a redirect to the user overview page should happen - it doesn't
image

Translation: add_item results in wrong translation within german

the translation-property add_item translates in germany to "Artikel hinzufügen". Which means like a purchaseable item or a basked like item or simmilar. But not line or element.
When used in places like Tasks, we dont add items to be purchased and therefore you better use "Element" (elements) or "Zeile" (line) instead.

I think a complete replace to "Zeile hinzufügen" should be the way to go.

Can't select Product in new Invoice

Steps to reproduce:

  • Create new invoice
  • Select customer
  • Add product
  • Try to change the product

I can't select a different product, after adding a product to the invoice. This morning, everything was still working fine, I guess the latest update created the problem.

Using hosted InvoiceNinja with the React Web UI
Screenshot 2023-08-15 191226

Sort invoices descending

The Flutter interface sorts the invoices by number, descending. The React interface sorts them ascending. Descending makes more sense since I'm now seeing four-year-old invoices first. I am working more with the most recent ones.

Default Tax Rate issues

image

Setup

  • Version: 5.1
  • Environment: Kubernetes

Checklist

Describe the bug

When selecting the default tax rates, I get many unexpected options, which probably once existed and have been deleted.
Also, if I select 19% it is applied correctly in invoices, but still displays 0% there.

Expected Behavior

Only the active rates are available.

Missing name/contact in transaction payment create view

With the latest commits as of 2023-03-03 I don't see any names/contacts in the payment creation sidebar of the transaction view. A screenshot is attached below:

image

With the "old" version it would show the contact name instead.

Screenshot is in German, if it helps I retake it in English.

List headers not filtering properly

Hi,

List headers are not filtering as expected.

See Payments and try filtering Invoice Number column. In my case, filtering is random.
I didn't observe this isue elsewhere !

Quote Import Breadcrumb URL incorrect

The breadcrumbs in the /quotes/import page to go back to the /quotes page is incorrect.

The expected value should be /quotes
The current value is /quote

image

Can't add product in new invoice

Steps to reproduce:

  • Add new Invoice
  • Select Customer (first error: just a limited list of customers can be selected)
  • Add Product (second error: no way to add Product, instead there is a loading icon)
    Screenshot 2023-10-30 194600

Using hosted InvoiceNinja with the React Web UI

CSS failures and creation of Reminders and Dunning out from Dropdown

Current Version: 5.7.5 in Self Hosted Environment

Informations
Point 1: Before few versions I can do dupe a invoice to a reminder / dunning out from the invoice table. Now it's gone and more complicated. So in my UI I can't find it anymore (for both UI; Flutter and React). Is there any chance to get it back? It will be much more comforble and smarter to create reminders.

Point 2: Check the Dropdown Menu CSS errors form the pictures. :-)

Point 3: Maybe a side menu points with "Reminders / Dunnings" which I send to customers? And also a Side menu entry in the customer portal.

Point 4: Show Reminders and Dunnings correctly in the Invoice History.

Screenshots
image

If the user manually toggled on (or off) the main menu sidebar, automatically remember and restore that state on next page load / startup

In v5 (tested on the Pro SaaS version), if you toggle off the main menu's sidebar with the < button, close the browser (or the tab) and reopen the page, its state gets reset open on the next load. Also, it gets shown in situations where it isn't realistic to show it.

  • If not pinned to a particular state It should also probably auto-collapse when space is clearly insufficient, which would help a little bit with my "small dedicated tasks list / time tracker window" usecase.
  • If the user explicitly opened or closed it, then it should automatically remember its user-set state, per device with a browser cookie (i.e. I want it to be always closed on my tiny window app mode, but not on my full-width big browser, which are two different browsers).

To be usable in closed state, its icons should have alt text and title hover labels: #1355.

Templates and Reminders: Should not allow an empty value in the field "Days" for reminders

Issue description

When you configure a reminder using the ReactUI, the form allows you to delete what's in the "Days" field and save the parameters. On the server side, there is no validation either and an empty string is saved in the database. However, the flutter app expect to receive an integer and so it throws a deserialization error which prevent you from login.

Expected behavior

The "Days" field should either be set as required or, like in the flutter app, be set to 0 if it's empty.

Missing translation

Hi,
in the dashbord of the new web ui there are two missing texts:

image

  • And in the dashboard graph settings
    image

Wrong payment types displayed in list

Hi,
There is a difference in payment types displayed in the Payments page list.

When selected as payment type, Flutter displays Bank Transfer, but React displays Credit
Same for Cash in Flutter displayed as 2 in React.

See screenshots
Screenshot_1
Screenshot_2

Color status badge

It would be nice if the status badges for invoices would have colors like the flutter interface..
I am not handy enough to create a good pull request ;) but I thought of something like a case switch in the StatusBadge.tsx

Something like...

  ...
  let className = 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium';

  // colors
  switch(props.code) { 
     case '1': { 
        //draft 
        className += ' bg-gray-100 text-gray-800';
        break; 
     }
     case '2': {
        //send
        className += ' bg-blue-100 text-blue-800';
        break; 
     }
     case '3': { 
        //partial/paid 
        className += ' bg-orange-100 text-orange-800';
        break; 
     }
     case '4': { 
        //paid
        className += ' bg-green-100 text-green-800';
        break; 
     }
     default: { 
        //default 
        className += ' bg-gray-100 text-gray-800';
        break; 
     } 
  } 
  ...

https://github.com/invoiceninja/ui/blob/main/src/components/StatusBadge.tsx

I think there is also missing a status code for invoices due over the date.

Invoices get Overdue instead of TODO status

In v8/3/23 the invoice list shows all old invoices with the status "Overdue".
If you browse a detail page of a customer and open the tab invoices, they get correctly tagged as Paid.

The Flutter interface shows it correctly.

If you filter on Unpaid in the invoice list, you also get those old Paid invoices.

v5 tasks list table and filters are not consistently responsive (not adapted to various window widths) and not as efficient, compared to v4's Time Tracker

I'm a user of the paid SaaS version, and I waited as long as possible before doing the upgrade to v5 because I wanted to give you more time to polish things up, and to run into the least issues possible. However, as I upgraded now, I see that https://app.invoicing.co/#/tasks is a big usability & UX regression for me compared to the traditional https://app.invoiceninja.com/time_tracker?q=Ftime_tracker ...especially as I'm using it with a bookmark in a separate browser window (or as an Epiphany with Invoice Ninja set as a "web app"!) as a quick minimalist time tracking app while I'm working.

Speed/efficiency

The previous UI had a very simple workflow: you open the time tracker, you type a few characters to quick search the task (or client, or project) you want, select the task, click the big green "Resume" button, and "Stop" when you're done. This could be done in the blink of an eye, extremely important when you need to start a task on a dime when receiving a phone call or during a meeting. I really liked that big obvious single-click button in the top-right corner, though I guess I can learn to live with the need to go through a menu for a task to be "Started" or "Stopped", but it would be nice if this was a prime action rather than buried in a submenu.

Adapting to any window width

The old v4 time tracker, with its multiline rows, behaved fine and looked well balanced even at tiny window sizes, there was no way to "break" it:

invoice ninja time trackers - v4 - pix opti

v5's tasks list is really not consistently responsive, whether I test with Firefox or with Epiphany (I particularly like using Epiphany's app mode). Both the tasks table and its filters bar above it break in so many ways, it's really not a pleasant experience. Below are screenshots of how broken it looks at various widths.

First, the only minimum width where it is not broken: around 1500 px wide:

invoice ninja time tracker - v5 at 2023-11-27 17-31-43 - pix opti

Shrink a bit, and the buttons in the rightmost column get cut off:

invoice ninja time tracker - v5 at 2023-11-27 17-34-14 - pix opti

Shrink more, and those buttons become entirely off-screen, and the filters bar's widgets start breaking apart and becoming multiline:

invoice ninja time tracker - v5 at 2023-11-27 17-34-23 - pix opti

Now this is just getting silly:

invoice ninja time tracker - v5 at 2023-11-27 17-34-31 - pix opti

...and even with the main menu sidebar turned off, the table still can't display all its stuff!

invoice ninja time tracker - v5 at 2023-11-27 17-34-57 - pix opti

Could you please make it breakdown nicely at any width? And probably automatically toggle off the main menu sidebar when width is way too small to be practical showing table data anyway.

For starters, it would probably help if your table rows were multi-line to display the client and project name below the task name, like the v4 UI, and didn't display the state column twice (!), or a task number column (that's a new thing in v5 it seems? why don't my existing tasks not have a number, and why should I care to see the task's number in a table?)

v5's dark theme colors have insufficient contrast for hyperlinks and some buttons

After upgrading my Pro v4 SaaS account to v5, I was able to test the dark theme (although it is not automatically enabled based on the system's theme, invoiceninja/admin-portal#424), however the color palette is bad for accessibility. For example, right on the dashboard page, the "Recent payments" table:

image

This table row has a multitude of color problems (which can probably be seen in various other places in the InvoiceNinja UI):

  • The hyperlinks are medium-dark blue on a dark blue background, which provides terrible contrast. They should be a brighter sky blue (like Firefox does in its articles Readability mode), a bit closer to white.
  • The white row divider lines are, ironically, waaaaay too bright and contrasty. They're not supposed to be the thing grabbing my eyes here. The dashboard's revenue "Overview" graph also has what seems like very bright grid lines, I suspect it will distract from the visuals.
  • White text on a bright-green button (or white on light blue, for example: image) also fails to be readable. Black text on that type of bright button, or darker button background colors, please. But not too dark because then you end up with this situation where your button totally blends into the background:
    image

You can easily avoid such problems by using this. It would be good to use that tool to review all the theme colors used throughout the UI.

Missing translation and currency

Hi everybody,
just switched to the nee frontend:
image
I noticed, that the Company currency isn't applied, and in the payment graph the dates aren't translated.

Subject of sendEmail not editable

I just noticed a difference between the flutter app and the react app. within flutter, i was able to edit the subject, when sending a email to a invoice. within react this was not possible.

I guess the react app probably does not reconise my white-label-license, because i get the buy option on the dashboard too.

Dashboard - rounding and currency sign

Hi,
since the latest update the graphs are now localised. Thank you!!!
But the y-scale misses a currency sign, and the data points are not rounded and miss a currency sign as well:
image

URLs are broken in production environments

Version: v5.5.6-C89 (according to the Flutter frontend)

Refreshing the page in the browser does not work as expected.

Expected result

  • I can hit refresh just fine.
  • I can share working links with my workmates. (The Flutter frontend misses this feature in the first place)

Actual result

You’ll end up with an error 404 page.

Seems like those routes aren’t registered to be handled by the frontend.
I’d suggest doing either:

  • Redirect those routes to the frontend
  • Don’t use the PushState API

Screenshot

image

Filter invoice list on customer name

In the Flutter interface and v4, you can enter a subset of a name to filter invoices. In the React interface currently, the filter seems to filter only on invoice numbers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.