Skip to content

Commit

Permalink
updated property and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Damandeep Singh committed May 14, 2018
1 parent 7b995c3 commit aee0650
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ An overlay is shown as slider to select slots

|Property|type|required|reflected|notify|description|
|----|---|--|--|--|--|
|occupency|Array|yes|false|false|Set of slots already booked |
|bookings|Array|yes|false|false|Set of slots already booked |
|chosen-start-time|String|no|true|true|Starting time slot value|
|chosen-end-time|String|no|true|true|Ending time slot value|
|chosen-units|Number|no|true|true|Number of slots chosen|



### Occupency property must be an Array of meetings
### _bookings_ property must be an Array of meetings

```javascript
occupency: [{
bookings: [{
meetingName: 'Sai\'s Meeting',
meetingId: 'bbcks',
meetingStartTime: '3:00 PM',
Expand Down Expand Up @@ -55,5 +55,7 @@ An overlay is shown as slider to select slots
Please note: Property with `notify: true` fires a _property_-changed event when the value is changed.
Example: *PropertyName* fires `property-name-changed` event on value change

[npm]('https://www.npmjs.com/package/timeslot-picker')
[github]('https://github.com/DamandeepS/timeslot-picker')
[npm][1]
[github][2]
[1]: https://www.npmjs.com/package/timeslot-picker
[2]: https://github.com/DamandeepS/timeslot-picker
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "timeslot-picker",
"description": "A polymer element for choosing timeslots. Timeslots can be variable.",
"main": "timeslot-picker.js",
"version": "0.9.3",
"version": "0.9.5",
"dependencies": {
"@polymer/polymer": "^3.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions timeslot-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TimeslotPicker extends PolymerElement {
}
static get properties() {
return {
occupancy: {
bookings: {
type: Array,
value: [{
meetingName: 'Sai\'s Meeting',
Expand Down Expand Up @@ -157,7 +157,7 @@ class TimeslotPicker extends PolymerElement {

}
return arr;
})(this.occupancy)
})(this.bookings)

var availableSlotStartTime = null, aUnits=0, availableSlotId=null;
for(let i=0; i<=47; i++) {
Expand All @@ -184,7 +184,7 @@ class TimeslotPicker extends PolymerElement {
return b;
}
return null;
})(this.occupancy,time);
})(this.bookings,time);
// console.log('BOOKING: ', currentBooking)
if(currentBooking) {
unit.set('units', currentBooking.units||1);
Expand Down

0 comments on commit aee0650

Please sign in to comment.