Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1041 from City-of-Helsinki/release/0.6.0
Browse files Browse the repository at this point in the history
Release v0.6.0
  • Loading branch information
Chi Nguyen authored Oct 3, 2019
2 parents 5190d6d + 3c9434e commit 65d7ce4
Show file tree
Hide file tree
Showing 718 changed files with 16,473 additions and 13,802 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CLIENT_ID=
CLIENT_SECRET=
SESSION_SECRET=
TIME_ZONE=
TARGET_APP=
CUSTOM_MUNICIPALITY_OPTIONS=[]
18 changes: 16 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@

"react/no-string-refs": "off",

"react/no-unused-prop-types": ["error", { "skipShapeProps": true }],
"react/no-unused-state": "warn",

"react/no-unused-prop-types": ["warn", { "skipShapeProps": true }],

"react/prefer-stateless-function": "off",

Expand All @@ -89,6 +91,18 @@

"react/no-array-index-key": "off",

"comma-dangle": "off"
"comma-dangle": "off",

"max-len": ["warn", { "code": 120}],

"no-plusplus": "off",

"no-undef": "warn",

"arrow-body-style": "off",

"quote-props": "off",

"no-case-declarations": "off"
}
}
59 changes: 49 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,76 @@
# 0.6.0
**MAJOR CHANGES**
- Support for payments in Varaamo.
- Add option to configure time zone of calendar/resources. Defaults to `Europe/Helsinki`.
- Permission checking has been changed: We are now using unit authorizations instead of unit object permissions from respa admin.

***CALENDAR***
- Add reusable FullCalendar component.
- Fix FullCalendar not auto-select `min_period` time slot when user select. Various fixes related to edit reservation calendar, drag and drop and select error handler.
- Fix missing `max_period` check when user select / resize calendar reservation. Show notification and revert to `max_period` if user select bigger amount of time slot than the limit. Various improvement for calendar is included as well.
- Add custom mobile view and stylings in calendar.

**MINOR CHANGES**
- Replace failure message and add a return button for reservation payment.
- Fix manage reservation page only display `can_approve` reservation, now display *all* reservations. Add strict rules for staff to be able to edit/cancel specific reservation.
- Fix missing reservation metadata fields data in manage reservation view. Trim empty field row.
- Add `show_only` filter section to filter reservation list. This filter have `can_modify` as its default value.
- Anonymous users now see a log in button below the calendar on the resource page helping them understand that they need to log in to continue.
- Errors from respa backend are not swallowed in our ApiClient anymore.
- Allow user to select time slot which is already happening.

**HOTFIX**
- Fix resource information headlines and icon.
- Fix default timezone being overrided and disappear from moment object by fullcalendar moment-timezone plugin.

**CHANGELOG**
- [#995](https://github.com/City-of-Helsinki/varaamo/pull/995) Fix resource information headlines and icon.
- [#968](https://github.com/City-of-Helsinki/varaamo/pull/968) Support payments for Varaamo.
- [#999](https://github.com/City-of-Helsinki/varaamo/pull/968) Add reusable FullCalendar component. Used in resource page.
- [#1002](https://github.com/City-of-Helsinki/varaamo/pull/1002) Replace failure message and add a return button.
- [#1004](https://github.com/City-of-Helsinki/varaamo/pull/1004) Staff cannot see normal reservations.
- [#1005](https://github.com/City-of-Helsinki/varaamo/pull/1005) Reservation information modal is missing metadata fields.
- [#1006](https://github.com/City-of-Helsinki/varaamo/pull/1006) Manage reservation filter buttons.
- [#1026](https://github.com/City-of-Helsinki/varaamo/pull/1026) Add support for minPeriod auto-select.
- [#1027](https://github.com/City-of-Helsinki/varaamo/pull/1027) Improve resource page usability for anonymous users.
- [#1028](https://github.com/City-of-Helsinki/varaamo/pull/1028) Always fetch reservations with start and end filters.
- [#1029](https://github.com/City-of-Helsinki/varaamo/pull/1029) Add option to configure time zone for resources.
- [#1033](https://github.com/City-of-Helsinki/varaamo/pull/1033) Show errors to staff members if editing of reservations fail.
- [#1031](https://github.com/City-of-Helsinki/varaamo/pull/1031) Use resource's userPermissions.isAdmin flag to check if user isStaff.
- [#1032](https://github.com/City-of-Helsinki/varaamo/pull/1032) Better max period handling for FullCalendar.
- [#1035](https://github.com/City-of-Helsinki/varaamo/pull/1035) Daily / weekly view for mobile.
- [#1037](https://github.com/City-of-Helsinki/varaamo/pull/1037) Allow to select timeslot which is already happening.
- [#1039](https://github.com/City-of-Helsinki/varaamo/pull/1039) Fix moment-timezone default timezone.

# 0.4.2
**HOTFIX**
```
- Fix various styling issue for date-picker [#991](https://github.com/City-of-Helsinki/varaamo/pull/991)
```
- Add `isAdmin` check for RecurringReservationControl to normal user will not able to make recurring reservation. [#993](https://github.com/City-of-Helsinki/varaamo/pull/993/)


# 0.4.1
**HOTFIX**
```
- Fix security warnings for dependencies: react-select, jest, postcss-loader, codecov, node-sass, eslint
```

# 0.4.0
**MAJOR CHANGES**
```
- Add new purpose section for sauna and organize events. As well as mock placeholder icon.
- Some technical improvements.
```

**CHANGELOG**
- [#940](https://github.com/City-of-Helsinki/varaamo/pull/940) Upgrade fortawesome, add new temp purpose icon.
- [#939](https://github.com/City-of-Helsinki/varaamo/pull/939) Rename all classnames imports to classNames
- [#934](https://github.com/City-of-Helsinki/varaamo/pull/934) New folder structure

# 0.3.0
**MAJOR CHANGES**
```
- Add translation for date-picker, show date and month in currently selected language.

- Set varaamo timezone to flexible base on user local timezone.

- Add slotSize and minPeriod to reservation select, enable ability to reserve sauna slots with default amount of minPeriod. Time slot range equal with slotSize config from backend.

- Show access-code pending text if the access-code is generated 24h before reservation starts.
```

**CHANGELOG**

Expand All @@ -50,12 +89,12 @@

- Add new selection field to sort filtered resources. Currently support to search by name, type, premise, people.
- Temporarily only show warning messages in 3 languages for IE11 user.
- Ability to favourite resources straight on search view instead going to resource detail page.
- Ability to favorite resources straight on search view instead going to resource detail page.

**CHANGELOG**

- [#895](https://github.com/City-of-Helsinki/varaamo/pull/895) Add sort to sort filtered resources.
- [#904](https://github.com/City-of-Helsinki/varaamo/pull/904) Favourite Resource on search view.
- [#904](https://github.com/City-of-Helsinki/varaamo/pull/904) Favorite Resource on search view.
- [#909](https://github.com/City-of-Helsinki/varaamo/pull/909) Show warning message for IE11 users.

# 0.1.1
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ By default the running app can be found at `localhost:3000`.
TARGET_APP
API_URL
CUSTOM_MUNICIPALITY_OPTIONS
TIME_ZONE
```
Environment's variable guideline:
Expand All @@ -82,6 +83,8 @@ By default the running app can be found at `localhost:3000`.
Without this config, default to use 3 central cities Helsinki, Espoo, Vantaa as options.
- `TIME_ZONE`:
The time zone of your resources. Bookings and calendars will be shown with this time zone no matter what the end users' browser is configured for. Defaults to Europe/Helsinki.
3. Then, start the development server:
Expand Down Expand Up @@ -202,7 +205,7 @@ All setting was included under .vscode directory.
- On Jest test:
[Guideline](https://jestjs.io/docs/en/troubleshooting#debugging-in-vs-code). Setting was under `Vscode Jest debugger` name.
- Put breakpoint in test file `(*.spec.js)`
- Put breakpoint in test file `(*.test.js)`
- Run command:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import simple from 'simple-mock';

import * as apiUtils from 'utils/apiUtils';
import * as reservationActions from 'actions/reservationActions';
import * as apiUtils from '../../utils/apiUtils';
import * as reservationActions from '../reservationActions';

describe('Actions: reservationActions', () => {
const reservation = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import types from 'constants/ActionTypes';

import { favoriteResource, unfavoriteResource } from 'actions/resourceActions';
import { buildAPIUrl } from 'utils/apiUtils';
import { createApiTest } from 'utils/testUtils';
import types from '../../constants/ActionTypes';
import { favoriteResource, unfavoriteResource } from '../resourceActions';
import { buildAPIUrl } from '../../utils/apiUtils';
import { createApiTest } from '../../utils/testUtils';

describe('Actions: resourceActions', () => {
describe('favoriteResource', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import simple from 'simple-mock';
import * as reduxActions from 'redux-actions';

import { updateRoute } from 'actions/routeActions';
import { updateRoute } from '../routeActions';

describe('Actions: resourceActions', () => {
describe('updateRoute', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import simple from 'simple-mock';

import { getPiwikActionName, searchResources } from 'actions/searchActions';
import * as apiUtils from 'utils/apiUtils';
import { getPiwikActionName, searchResources } from '../searchActions';
import * as apiUtils from '../../utils/apiUtils';

describe('Actions: searchActions', () => {
let getRequestTypeDescriptorMock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import types from 'constants/ActionTypes';

import simple from 'simple-mock';

import * as apiUtils from 'utils/apiUtils';
import { fetchUnits } from 'actions/unitActions';
import types from '../../constants/ActionTypes';
import * as apiUtils from '../../utils/apiUtils';
import { fetchUnits } from '../unitActions';

describe('Actions: unitActions', () => {
let getRequestTypeDescriptorMock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import simple from 'simple-mock';

import * as apiUtils from 'utils/apiUtils';
import { fetchUser } from 'actions/userActions';
import * as apiUtils from '../../utils/apiUtils';
import { fetchUser } from '../userActions';

describe('Actions: userActions', () => {
let getRequestTypeDescriptorMock;
Expand Down
13 changes: 0 additions & 13 deletions app/actions/notificationsActions.js

This file was deleted.

35 changes: 0 additions & 35 deletions app/actions/purposeActions.js

This file was deleted.

11 changes: 5 additions & 6 deletions app/actions/reservationActions.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import types from 'constants/ActionTypes';

import pickBy from 'lodash/pickBy';
import { decamelizeKeys } from 'humps';
import pickBy from 'lodash/pickBy';
import { RSAA } from 'redux-api-middleware';

import schemas from 'store/middleware/Schemas';
import types from '../constants/ActionTypes';
import schemas from '../store/middleware/Schemas';
import {
buildAPIUrl,
getErrorTypeDescriptor,
getHeadersCreator,
getRequestTypeDescriptor,
getSuccessTypeDescriptor,
} from 'utils/apiUtils';
import { getMissingValues, isStaffEvent } from 'utils/reservationUtils';
} from '../utils/apiUtils';
import { getMissingValues, isStaffEvent } from '../utils/reservationUtils';

function commentReservation(reservation, resource, comments) {
const missingValues = getMissingValues(reservation);
Expand Down
8 changes: 3 additions & 5 deletions app/actions/resourceActions.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import types from 'constants/ActionTypes';

import { RSAA } from 'redux-api-middleware';

import schemas from 'store/middleware/Schemas';
import types from '../constants/ActionTypes';
import schemas from '../store/middleware/Schemas';
import {
buildAPIUrl,
getErrorTypeDescriptor,
getHeadersCreator,
getRequestTypeDescriptor,
getSuccessTypeDescriptor,
} from 'utils/apiUtils';
} from '../utils/apiUtils';

function fetchFavoritedResources(timeAsMoment, source) {
const params = {
Expand Down Expand Up @@ -40,7 +39,6 @@ function fetchResource(id, params = {}) {

function fetchResources(params = {}, source) {
const fetchParams = Object.assign({}, params, { pageSize: 500 });

return {
[RSAA]: {
types: [
Expand Down
12 changes: 5 additions & 7 deletions app/actions/searchActions.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import types from 'constants/ActionTypes';
import constants from 'constants/AppConstants';

import { createAction } from 'redux-actions';
import { RSAA } from 'redux-api-middleware';


import schemas from 'store/middleware/Schemas';
import types from '../constants/ActionTypes';
import constants from '../constants/AppConstants';
import schemas from '../store/middleware/Schemas';
import {
buildAPIUrl,
getErrorTypeDescriptor,
getHeadersCreator,
getRequestTypeDescriptor,
getSuccessTypeDescriptor,
} from 'utils/apiUtils';
import { getFetchParamsFromFilters } from 'utils/searchUtils';
} from '../utils/apiUtils';
import { getFetchParamsFromFilters } from '../utils/searchUtils';

const clearSearchResults = createAction(types.UI.CLEAR_SEARCH_FILTERS);
const toggleMap = createAction(types.UI.TOGGLE_SEARCH_SHOW_MAP);
Expand Down
Loading

0 comments on commit 65d7ce4

Please sign in to comment.