git clone [email protected]:diegosteiner/heimv.git
cd heimv
docker-compose up app
or with VS Code: [Reopen in Container] with Remote Containers Extension
Then inside the container you may run:
bin/rails-dev-server
to start rails serverbin/vite dev
to start vite dev serverbin/sidekiq-job-worker
to start the sidekiq worker process
To visit the automatically created default organization, visit http://heimv.localhost:3000/.
After starting the development servers, open the browser http://heimv.localhost:3000/ and log in with:
- Manager: [email protected], heimverwaltung
- Read only user: [email protected], heimverwaltung
- Setup DB:
bin/rails db:prepare
- Run migrations:
bin/rails db:migrate
- Run checks:
bin/check
- Run e2e Tests:
bin/e2e
Copy env.example to .env and change configuration there
<iframe
sandbox="allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-top-navigation"
src="https://app.heimv.ch/{{organisation.slug}}/occupiables/{{occupiables.id}}/calendar/embed?display_months=9"
style="width: 100%; overflow-x: hidden; overflow-y: scroll; height: 960px; border: none;">
border="0"
</iframe>
<iframe
sandbox="allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-top-navigation"
src="https://app.heimv.ch/{{organisation.slug}}/homes/{{home.id}}/occupancies/embed?display_months=9"
border="0"
style="width: 100%; overflow-x: hidden; overflow-y: scroll; height: 960px; border: none;">
</iframe>
Use this feed in a ICAL compatible calendar app:
https://app.heimv.ch/{{organisation.slug}}/occupiables/{{occupiable.id}}/calendar.ics
Use this feed to get more info (token required)
The token can be generated with user.regenerate_token
Create a organisation with richtext templates and a user:
onboarding = OnboardingService.create(name: <name>, email: <email>, slug: <slug>)
onboarding.create_missing_rich_text_templates!(include_optional: true)
onboarding.add_or_invite_user!
Translations are driven by translation.io and their free service for opensource projects.
Automatically change after some time has passed:
bin/rails r TransitionBookingStatesJob.perform_now
Resend failed Notification attemps:
bin/rails r RetryFailedNotificationsJob.perform_now
Prepare a csv with these columns, including a header, as utf-8:
- begins_at (as ISO8601)
- ends_at (as ISO8601)
- email (optional)
- ref (which will set the reference, optional)
- remarks (optional)
- organisation (which refers to the tenants organisation, optional)
- category (which corresponds to the booking category keys set for the organisation, optional)
- phone
Options:
- initial_state: State to which the booking shall be transitioned
- default_category:
- headers: Header map e.g. for import from pfadiheime.ch
headers = "
ignore.id,ignore.cottage_id,ignore.user_id,booking.begins_at,booking.ends_at,booking.remarks,booking.occupancy_type,ignore.created_at,ignore.updated_at,tenant.email,ignore.occupancy_type,booking.remarks,ignore.slug,booking.headcount,tenant.birth_date,booking.tenant_organisation,tenant.name,tenant.street_address,tenant.street_address_2,tenant.zipcode,tenant.city,tenant.phone"
Then import data with:
cat data.csv | bin/rails r "Import::Csv::BookingImporter.new(home).parse(ARGF, **options)"
or with heroku:
cat data.csv | heroku run --no-tty -- 'bin/rails r "Import::Csv::BookingImporter.new(home).parse"'
Prepare a csv with these columns, including a header, as utf-8:
- tenant.first_name
- tenant.last_name
- tenant.nickname
- tenant.street
- tenant.zipcode
- tenant.city
- tenant.phone
- tenant.email
- tenant.remarks
Then import data with:
cat data.csv | bin/rails r "Import::Csv::TenantImporter.new(organisation).parse"
Prepare a csv with these columns, including a header, as utf-8:
- ordinal
- label
- type
- tarif_group
- unit
- price
- associated_types
Then import data with:
cat data.csv | bin/rails r Import::Csv::TarifImporter.new(home).read
cat ./path/to/backup.dump | docker exec -i $(docker ps -q --filter name=heimv-db-) pg_restore -U postgres -d heimv_development --host=localhost --no-privileges --no-owner
🎂 1000th commit 🎂
Copyright 2017-2023 Diego P. Steiner & contributors
If you want to use HeimV in a commercial setting, a commercial licence is required. For a commercial licence please get in touch: [email protected]. Other than that, the project is licensed under the AGPLv3 License. See LICENCE for details.