Skip to content

Commit

Permalink
fix: add configuration for the calendar (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Philippe Tissot authored May 21, 2021
1 parent f3b6d57 commit c530d08
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 119 deletions.
8 changes: 7 additions & 1 deletion src/Apps/StatCan.OrchardCore.Scheduling/Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task<int> CreateAsync()
{
await _recipeMigrator.ExecuteAsync("initial.recipe.json", this);
_contentDefinitionManager.AlterTypeDefinition("Taxonomy", t=>t.Securable());
return 2;
return 3;
}
public async Task<int> UpdateFrom1Async()
{
Expand All @@ -30,5 +30,11 @@ public async Task<int> UpdateFrom1Async()
_contentDefinitionManager.AlterTypeDefinition("Taxonomy", t=>t.Securable());
return 2;
}
public async Task<int> UpdateFrom2Async()
{
// re-run the recipe for existing deployments
await _recipeMigrator.ExecuteAsync("initial.recipe.json", this);
return 3;
}
}
}
169 changes: 136 additions & 33 deletions src/Apps/StatCan.OrchardCore.Scheduling/Migrations/initial.recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,27 @@
}
}
]
},
{
"Name": "CalendarSettings",
"DisplayName": "Calendar Settings",
"Settings": {
"ContentTypeSettings": {
"Stereotype": "CustomSettings"
},
"FullTextAspectSettings": {}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "CalendarSettings",
"Name": "CalendarSettings",
"Settings": {
"ContentTypePartSettings": {
"Position": "0"
}
}
}
]
}
],
"ContentParts": [
Expand Down Expand Up @@ -292,7 +313,7 @@
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "FirstName",
"Position": "2"
"Position": "1"
}
}
},
Expand All @@ -302,7 +323,7 @@
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Last Name",
"Position": "3"
"Position": "2"
}
}
},
Expand All @@ -312,7 +333,7 @@
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Consent",
"Position": "5"
"Position": "4"
},
"BooleanFieldSettings": {
"Hint": "Consent form has been signed by the employee"
Expand All @@ -326,7 +347,7 @@
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Participating",
"Position": "4"
"Position": "3"
},
"BooleanFieldSettings": {
"Hint": "The employee is participating in the testing"
Expand All @@ -348,41 +369,57 @@
}
}
]
},
{
"Name": "CalendarSettings",
"Settings": {},
"ContentPartFieldDefinitionRecords": [
{
"FieldName": "TextField",
"Name": "FirstTime",
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "First Time",
"Position": "0"
},
"TextFieldSettings": {
"Hint": "First time displayed in the calendar HH:mm format. See https://vuetifyjs.com/en/api/v-calendar/#props-first-time "
}
}
},
{
"FieldName": "TextField",
"Name": "IntervalCount",
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Interval Count",
"Position": "1"
},
"TextFieldSettings": {
"Hint": "The number of intervals to display. https://vuetifyjs.com/en/api/v-calendar/#props-interval-count "
}
}
},
{
"FieldName": "TextField",
"Name": "IntervalMinutes",
"Settings": {
"ContentPartFieldSettings": {
"DisplayName": "Interval Minutes",
"Position": "2"
},
"TextFieldSettings": {
"Hint": "The number of minutes the intervals are. \r\nhttps://vuetifyjs.com/en/api/v-calendar/#props-interval-minutes"
}
}
}
]
}
]
},
{
"name": "content",
"data": [
{
"ContentItemId": "4wnw5cysybe8szzhehezz5b74b",
"ContentItemVersionId": "42p43tpp922cn31wpfadcwxtn1",
"ContentType": "Taxonomy",
"DisplayText": "Calendars",
"Latest": true,
"Published": true,
"ModifiedUtc": "2021-05-18T17:22:49.2243686Z",
"PublishedUtc": "2021-05-18T17:22:49.2316346Z",
"CreatedUtc": "2021-05-18T17:04:12.2054281Z",
"TitlePart": {
"Title": "Calendars"
},
"AliasPart": {
"Alias": "calendars"
},
"AutoroutePart": {
"Path": "calendars",
"SetHomepage": false,
"Disabled": false,
"RouteContainedItems": true,
"Absolute": false
},
"TaxonomyPart": {
"Terms": [
],
"TermContentType": "AppointmentCalendar"
}
},
{
"ContentItemId": "4gbw4m0mz1sh45v9f2ztznktnw",
"ContentItemVersionId": "41eytr03g1z67zp0d627pr4b58",
Expand Down Expand Up @@ -544,6 +581,72 @@
}
]
}
},
{
"ContentItemId": "4wnw5cysybe8szzhehezz5b74b",
"ContentItemVersionId": "470gbw6nd2cqzrtc4mcs37dac2",
"ContentType": "Taxonomy",
"DisplayText": "Calendars",
"Latest": true,
"Published": true,
"ModifiedUtc": "2021-05-20T19:06:47.9459677Z",
"PublishedUtc": "2021-05-20T19:06:47.9505872Z",
"CreatedUtc": "2021-05-18T17:04:12.2054281Z",
"Owner": null,
"Author": "scheduler",
"TitlePart": {
"Title": "Calendars"
},
"AliasPart": {
"Alias": "calendars"
},
"AutoroutePart": {
"Path": "calendars",
"SetHomepage": false,
"Disabled": false,
"RouteContainedItems": true,
"Absolute": false
},
"TaxonomyPart": {
"Terms": [
{
"ContentItemId": "4qb36abcfn35004p3fsrcwned3",
"ContentItemVersionId": null,
"ContentType": "AppointmentCalendar",
"DisplayText": "Default",
"Latest": false,
"Published": false,
"ModifiedUtc": "2021-05-20T12:57:31.9350107Z",
"PublishedUtc": null,
"CreatedUtc": null,
"Owner": null,
"Author": "admin",
"AppointmentCalendar": {
"Color": {
"Text": "#8b1313"
}
},
"TitlePart": {
"Title": "Default"
},
"AutoroutePart": {
"Path": "default",
"SetHomepage": true,
"Disabled": false,
"RouteContainedItems": false,
"Absolute": false
},
"TermPart": {
"TaxonomyContentItemId": "4wnw5cysybe8szzhehezz5b74b"
},
"@WeldedPartSettings": {
"TermPart": {}
},
"Terms": []
}
],
"TermContentType": "AppointmentCalendar"
}
}
]
},
Expand Down
Loading

0 comments on commit c530d08

Please sign in to comment.