Skip to content

Commit

Permalink
Added "Who is in the office now" query (#613)
Browse files Browse the repository at this point in the history
- Added "Who is in the office now" query which will show all active
  users regardless of office.
  • Loading branch information
BrookJeynes authored Aug 29, 2023
1 parent 912747d commit e51b0af
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,6 @@
},
"name": "SSWSophieBot.GetCurrentEmployeesOnLocation.BeginDialog"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "iRae1n"
},
"condition": "=exists(dialog.locationEntity) && length(dialog.locationEntity) > 0",
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "0iZBft"
},
"activity": "${SendActivity_0iZBft()}"
},
{
"$kind": "Microsoft.EndDialog",
"$designer": {
"id": "Cg630n"
}
}
],
"actions": []
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
Expand Down Expand Up @@ -162,31 +139,65 @@
"resultProperty": "turn.utcEndTime"
},
{
"$kind": "GetProfileAction",
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "H3FuOa"
"id": "4yPDKi"
},
"queryString": [
{
"key": "location",
"value": "=dialog.locationEntity"
},
{
"key": "inoffice",
"value": "=true"
},
"actions": [
{
"key": "fromDate",
"value": "=if(turn.isNowQuery, null, turn.utcStartTime)"
},
"$kind": "GetProfileAction",
"$designer": {
"id": "uOGxSF"
},
"queryString": [
{
"key": "location",
"value": "=dialog.locationEntity"
},
{
"key": "inoffice",
"value": "=true"
},
{
"key": "fromDate",
"value": "=if(turn.isNowQuery, null, turn.utcStartTime)"
},
{
"key": "endDate",
"value": "=if(turn.isNowQuery, null, turn.utcEndTime)"
}
],
"statusCodeProperty": "turn.statusCode",
"reasonPhraseProperty": "turn.reasonPhrase",
"employeesProperty": "turn.employees"
}
],
"elseActions": [
{
"key": "endDate",
"value": "=if(turn.isNowQuery, null, turn.utcEndTime)"
"$kind": "GetProfileAction",
"$designer": {
"id": "YLDQp1"
},
"queryString": [
{
"key": "inoffice",
"value": "=true"
},
{
"key": "fromDate",
"value": "=if(turn.isNowQuery, null, turn.utcStartTime)"
},
{
"key": "endDate",
"value": "=if(turn.isNowQuery, null, turn.utcEndTime)"
}
],
"statusCodeProperty": "turn.statusCode",
"reasonPhraseProperty": "turn.reasonPhrase",
"employeesProperty": "turn.employees"
}
],
"statusCodeProperty": "turn.statusCode",
"reasonPhraseProperty": "turn.reasonPhrase",
"employeesProperty": "turn.employees"
"condition": "=exists(dialog.locationEntity) && length(dialog.locationEntity) > 0"
},
{
"$kind": "Microsoft.IfCondition",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
[Common](common.en-us.lg)
[PeopleList](peopleList.en-us.lg)

# SendActivity_5SdoY2()
[Activity
Text = ${SendActivity_5SdoY2_text()}
]

# SendActivity_5SdoY2_text()
- ${ErrorMessage()}

# SendActivity_MfjfA1()
[Activity
Text = ${SendActivity_MfjfA1_text()}
]

# SendActivity_MfjfA1_text()
- I couldn't find anyone in the **${dialog.locationEntity}** office at this time.
# SendActivity_0iZBft()
[Activity
Text = ${SendActivity_0iZBft_text()}
]

# SendActivity_0iZBft_text()
- Please specify a valid location to query.

# SendActivity_WXpguy()
[Activity
Attachments = ${json(PeopleListByBilled(
if(dialog.foreach.pageindex == 1, CardTitle(dialog.locationEntity, count(turn.billableEmployees.employees)), GetNextTitle(dialog.foreach.pageindex, 10)),
turn.clientDateTime,
if(dialog.foreach.pageindex == 1, true, false),
dialog.foreach.page,
dialog.foreach.pageindex * 10 >= count(turn.billableEmployees.employees),
'',
false,
'GetCurrentEmployeesOnLocation'))}
]

# CardTitle(location, count)
- ```${location} - All [${count}]```

# SendActivity_jhwmNx()
[Activity
Text = ${SendActivity_jhwmNx_text()}
]

# SendActivity_jhwmNx_text()
- Please specify a valid date to query.
[Common](common.en-us.lg)
[PeopleList](peopleList.en-us.lg)
# SendActivity_5SdoY2()
[Activity
Text = ${SendActivity_5SdoY2_text()}
]
# SendActivity_5SdoY2_text()
- ${ErrorMessage()}
# SendActivity_MfjfA1()
[Activity
Text = ${SendActivity_MfjfA1_text()}
]
# SendActivity_MfjfA1_text()
- I couldn't find anyone in the **${dialog.locationEntity}** office at this time.
# SendActivity_WXpguy()
[Activity
Attachments = ${json(PeopleListByBilled(
if(dialog.foreach.pageindex == 1, CardTitle(dialog.locationEntity, count(turn.billableEmployees.employees)), GetNextTitle(dialog.foreach.pageindex, 10)),
turn.clientDateTime,
if(dialog.foreach.pageindex == 1, true, false),
dialog.foreach.page,
dialog.foreach.pageindex * 10 >= count(turn.billableEmployees.employees),
'',
false,
'GetCurrentEmployeesOnLocation'))}
]
# CardTitle(location, count)
- ```${location} - All [${count}]```
# SendActivity_jhwmNx()
[Activity
Text = ${SendActivity_jhwmNx_text()}
]
# SendActivity_jhwmNx_text()
- Please specify a valid date to query.
# LogAction_Text_X1smd9()
[Activity
Text = ${LogAction_Text_X1smd9_text()}
]
# LogAction_Text_X1smd9_text()
- [Debug] - dialog.locationEntity = ${dialog.locationEntity}

0 comments on commit e51b0af

Please sign in to comment.