sebo-b / warp

Workspace Autonomous Reservation Program - a system to help you efficiently manage hybrid (assigned, hot-desks, etc) office space.
MIT License
139 stars 60 forks source link

I can't build any workplaces #25

Closed DzeTro closed 1 year ago

DzeTro commented 1 year ago

Under config.py, I have changed

LANGUAGE_FILE="i18n/en.js" to LANGUAGE_FILE="i18n/de.js". And config.py => from WEEKS_IN_ADVANCE = 1 to WEEKS_IN_ADVANCE = 5 so the map is not shown any more and I build any workplaces. The Bookings tab is also gone 😱 WARP.

sebo-b commented 1 year ago

Hi,

Thanks for the report. However I cannot reproduce this issue - can you please specify more details:

Can you run a clean instance and check it out? And if you can reproduce the issue, can you check if LANGUAGE_FILE or WEEKS_IN_ADVANCE creates the issue?

DzeTro commented 1 year ago

Procedure

New database PostgreSQL -> warptwo

Then I pulled a new source code from Github

I had to start warp as in without Docker - the old way, which also succeeded

From the command line:

clone repo git clone https://github.com/sebo-b/warp.git cd warp

Create and activate virtual environment python -m venv myenv .\myenv\enable scripts

install python requirements if this throws an error in psycopg2, either install all build dependencies or change psycopg2 to psycopg2-binary in requirements.txt $ pip install -r requirements.txt

Compile JavaScript files pushd js npm ci npm run build popd

Set up Flask and database URL set FLASK_APP=warp set FLASK_DEBUG=1 set WARP_DATABASE=postgresql://warp:warp@localhost:5432/warp

Check if environment variables are set echo %FLASK_APP%, echo %FLASK_ENV% echo %WARP_DATABASE%

Start the application flask run

Alternatively Secret key

This time I did not change anything and yet the zone I created does not appear to me.

in the Firefox browser with http://127.0.0.1:5000/users

Then started Warp and tried to create a new zone. This is then no longer displayed in Bookinsg, although it is available.

sebo-b commented 1 year ago

I'm not sure if I understand you correctly.

So after starting the clean instance - it works correctly, and example zones are available. Is that right?

Then after you create a new zone, the old zones and Bookings tab disappears, is this the case?

Or is it only that the new zone is not displayed in the top bar?

DzeTro commented 1 year ago

When I have downloaded a clean instance and started it as described above, this image appears after login grafik

I can create zones, users and groups, but they cannot select anything because the map with the workstations is missing.

According to the PostgreSQL log file, 2 errors occur.

  1. Relation  "db_initializedÂ" already exists.

  2. instruction: CREATE TABLE db_initialized();

sebo-b commented 1 year ago

These logs are correct - db_initialized is a "mutex" table.

So I think that your instance is working properly - you just need to learn how to use it, which may not be that intuitive if you haven't played with a demo instance (you can do that by setting FLASK_ENV=debug, cleaning the database flask init-db and running a debug instance flask run)

However, if you want to properly set up a zone, the following steps are needed: In the zones tab:

  1. Create a new zone, give it a name and a group (this can be any number)
  2. Click on the map button on the left side of the zone name and upload a map (png or jpeg will do) and create seats (add_seat then click on the map)
  3. Click on the gear icon on the left side of the zone name and assign people (or groups) to the zone.

Then the zone should be fully functional.