Giter VIP home page Giter VIP logo

hackerschool / hs-tms Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 2.46 MB

HackerSchool's Treasury Management System: the main control system for treasury inside HackerSchool, which can read billing documents and write to a treasury balance

Home Page: https://hs-tms.ngfg.pt/

License: Apache License 2.0

Dockerfile 0.35% JavaScript 90.56% HTML 0.17% CSS 7.94% PLpgSQL 0.70% Shell 0.29%
email-template file-manager nodejs oauth2 pdf-generation plotly-js reactjs treasury

hs-tms's People

Contributors

alfigueiras avatar dependabot[bot] avatar filipe-varela avatar fmata97 avatar gui-alm avatar nunogoncalves03 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hs-tms's Issues

Dockerize project

We need to dockerize our project to make it more portable and easier to deploy. Dockerization will also help us ensure consistent behavior across different environments.

Date discrepancy: pg module query result differs from database value

When using the pg module in Node.js to query a resource with a date column, the retrieved date value is different from the expected value. For example, if the date column in the database has '2023-05-21' stored, the pg module query result is '2023-05-20T23:00:00.000Z'.

Not being able to distinguish an unauthorized user from one who hasn't tried to log in

From the frontend POV, it would be helpful to distinguish users who have tried to log in but are not authorized from those who haven't tried, so the authentication error is not displayed to those who haven't tried to log in.

Setting the API to return different error codes depending on whether an error occurred, the user is unauthorized, or not authenticated would suffice.

Create a trigger function to update the balance column in the transactions table

Currently, the transactions table has the value and balance columns. The balance column is supposed to represent the balance of the organization after each transaction, where balance = previous transaction's balance + value.

However, the balance column is not updated automatically after each transaction is inserted into the table.

We should create a trigger function that updates the balance column automatically after each INSERT operation on the transactions table.

Fix listTransactions function

This function is not working properly when filtering transactions made by certain projects.
For example, if we have the following projects and transactions:

Projects:
[
  { id: 1, name: 'Project 1', active: true },
  { id: 2, name: 'Project 2', active: true },
  { id: 3, name: 'Project 3', active: true }
]

Transactions:
[
  {
    id: 1,
    date: '2023-04-29',
    description: 'Transaction 1',
    value: '1000',
    file_path: 'file1.pdf',
    has_nif: true,
    projects: 'Project 1 / Project 2 / Project 3'
  }
]

If we call it to get only the transactions made by Project 1 and Project 2, it returns

[
  {
    id: 1,
    date: '2023-04-29',
    description: 'Transaction 1',
    value: '1000',
    file_path: 'file1.pdf',
    has_nif: true,
    projects: 'Project 1 / Project 2'
  }
]

instead of

[
  {
    id: 1,
    date: '2023-04-29',
    description: 'Transaction 1',
    value: '1000',
    file_path: 'file1.pdf',
    has_nif: true,
    projects: 'Project 1 / Project 2 / Project 3'
  }
]

(the projects field should include all projects linked to that transaction)

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.