Skip to content

Commit

Permalink
Merge pull request #656 from SSWConsulting/revert-647-645_fix_who_is_…
Browse files Browse the repository at this point in the history
…on_client_work_in_china

Revert "Fix "who is on client work in china""
  • Loading branch information
AttackOnMorty authored Nov 6, 2023
2 parents 3b7c4ef + dedcad9 commit d76be9f
Show file tree
Hide file tree
Showing 19 changed files with 1,335 additions and 321 deletions.
83 changes: 83 additions & 0 deletions bots/employee-finder/src/SSW.SophieBot/SSWSophieBot.dialog
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,89 @@
}
]
},
{
"$kind": "Microsoft.OnIntent",
"$designer": {
"id": "mBzfYS",
"name": "OnIntent (GetExpertsByLocation)"
},
"intent": "GetExpertsByLocation",
"entities": [],
"actions": [
{
"$kind": "Microsoft.TraceActivity",
"$designer": {
"id": "6Yd16Q"
},
"name": "SSWSophieBot.OnIntent_GetExpertsByLocation",
"value": "=null"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "ATIN53"
},
"condition": "=exists(@redirect) && length(@redirect.actionType) > 0",
"actions": [
{
"$kind": "Microsoft.TelemetryTrackEventAction",
"$designer": {
"id": "pdzSoX"
},
"eventName": "IntentRedirect",
"properties": {
"SourceIntent": "[email protected]",
"TargetIntent": "GetExpertsByLocation",
"Action": "[email protected]",
"ActionType": "[email protected]"
}
}
]
},
{
"$kind": "Microsoft.EmitEvent",
"$designer": {
"id": "DHZDW5"
},
"eventName": "SetOptions"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "5ewWN6"
},
"condition": "=contains($options.implemented, \"GetExpertsByLocation\")",
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "eQ0O3I"
},
"activity": "${SendActivity_eQ0O3I()}"
}
],
"actions": [
{
"$kind": "Microsoft.BeginDialog",
"$designer": {
"id": "eOKgOm"
},
"activityProcessed": true,
"dialog": "GetExpertsByLocationDialog",
"options": {
"skillEntity": "=$options.skill",
"locationEntity": "=coalesce($options.location, 'all')",
"byBillable": "=@byBillable",
"isCurrentLocation": "=@isCurrentLocation",
"experienceLevel": "=coalesce(@experienceLevel, 'Advanced, Intermediate')",
"title": "=@title",
"clientNowSubtitle": "=@clientNowSubTitle"
}
}
]
}
]
},
{
"$kind": "Microsoft.OnIntent",
"$designer": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
{
"$kind": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "DLIumR",
"name": "GetAvailableExpertsByLocationDialog",
"comment": "To be removed as this is not used anywhere"
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$kind": "Microsoft.OnBeginDialog",
"$designer": {
"name": "BeginDialog",
"description": "",
"id": "whgYu3"
},
"actions": [
{
"$kind": "Microsoft.TraceActivity",
"$designer": {
"id": "TqUAsT"
},
"name": "SSWSophieBot.GetAvailableExpertsByLocation.BeginDialog",
"value": "=null"
},
{
"$kind": "GetProfileAction",
"$designer": {
"id": "Ny2ohz"
},
"queryString": [
{
"key": "booked",
"value": false
},
{
"key": "fromDate",
"value": "=dialog.dateEntity.value"
},
{
"key": "location",
"value": "=dialog.locationEntity"
},
{
"key": "skills",
"value": "=dialog.skillEntity"
}
],
"statusCodeProperty": "turn.statusCode",
"reasonPhraseProperty": "turn.reasonPhrase",
"employeesProperty": "turn.employees",
"skill": {}
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "7yX8TD"
},
"condition": "=turn.statusCode == 200",
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "0L7CNj"
},
"activity": "${SendActivity_0L7CNj()}"
}
],
"actions": [
{
"$kind": "GetProfileAction",
"$designer": {
"id": "wTBXbs"
},
"queryString": [
{
"key": "booked",
"value": "true"
},
{
"key": "fromDate",
"value": "=dialog.dateEntity.value"
},
{
"value": "=dialog.locationEntity",
"key": "location"
},
{
"value": "=dialog.skillEntity",
"key": "skills"
}
],
"statusCodeProperty": "turn.statusCode",
"reasonPhraseProperty": "turn.reasonPhrase",
"employeesProperty": "turn.internalbookedEmployees"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "zUXzc0"
},
"condition": "=turn.statusCode == 200",
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "C1DsiX"
},
"activity": "${SendActivity_C1DsiX()}"
}
],
"actions": [
{
"$kind": "TimeFormatAction",
"$designer": {
"id": "7KxZvy"
},
"datetime": "=dialog.dateEntity.value",
"format": "dddd d MMMM",
"resultProperty": "turn.formatDate"
},
{
"$kind": "GetInternalBookedEmployeesAction",
"$designer": {
"id": "7zJtZc"
},
"employees": "=turn.internalbookedEmployees",
"result": "turn.internalbookedEmployees",
"date": "=dialog.dateEntity.value"
},
{
"$kind": "Microsoft.SetProperty",
"$designer": {
"id": "zPkbul"
},
"property": "turn.employees",
"value": "=union(turn.internalbookedEmployees, turn.employees) "
},
{
"$kind": "Microsoft.SetProperty",
"$designer": {
"id": "wIXxRd"
},
"value": "=select(turn.employees, e, e.firstName)",
"property": "turn.firstNames"
},
{
"$kind": "StringJoinAction",
"$designer": {
"id": "ie4Rpw"
},
"stringList": "=select(turn.firstNames, n, concat(\"**\", n, \"**\"))",
"delimiter": ", ",
"lastDelimiter": " and ",
"resultProperty": "dialog.firstNames",
"wrapCount": 4
},
{
"$kind": "GetFreeEmployeesAction",
"$designer": {
"id": "x6JX6d"
},
"employees": "=turn.employees",
"result": "turn.employees",
"date": "=dialog.dateEntity.value"
},
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "rEdHJ2"
},
"condition": "=count(turn.employees) > 0",
"elseActions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "iSmCig"
},
"activity": "${SendActivity_sftkhO()}"
}
],
"actions": [
{
"$kind": "Microsoft.ForeachPage",
"$designer": {
"id": "OZCZuQ"
},
"pageIndex": "dialog.foreach.pageindex",
"page": "dialog.foreach.page",
"pageSize": 15,
"itemsProperty": "turn.employees",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "6uyLeH"
},
"activity": "${SendActivity_6uyLeH()}"
}
]
}
]
}
]
}
]
},
{
"$kind": "Microsoft.EndDialog",
"$designer": {
"id": "7g17jJ"
}
}
]
}
],
"generator": "GetAvailableExpertsByLocationDialog.lg",
"recognizer": "GetAvailableExpertsByLocationDialog.lu.qna",
"id": "GetAvailableExpertsByLocationDialog"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema",
"$role": "implements(Microsoft.IDialog)",
"title": "GetAvailableExpertsByLocationDialog",
"type": "object",
"properties": {
"skillEntity": {
"title": "Skill Entity",
"$ref": "#/definitions/stringExpression"
},
"locationEntity": {
"$ref": "#/definitions/stringExpression",
"title": "Location Entity"
},
"dateEntity": {
"$ref": "#/definitions/stringExpression",
"title": "Date Entity"
}
},
"$result": {
"type": "object",
"properties": {}
},
"definitions": {
"equalsExpression": {
"$role": "expression",
"type": "string",
"title": "Equals Expression",
"description": "Expression starting with =.",
"pattern": "^=.*\\S.*",
"examples": [
"=user.name"
]
},
"stringExpression": {
"$role": "expression",
"title": "String or expression",
"description": "Interpolated string or expression to evaluate.",
"oneOf": [
{
"type": "string",
"title": "String",
"description": "Interpolated string",
"pattern": "^(?!(=)).*",
"examples": [
"Hello ${user.name}"
]
},
{
"$ref": "#/definitions/equalsExpression",
"examples": [
"=concat('x','y','z')"
]
}
]
}
}
}
Loading

0 comments on commit d76be9f

Please sign in to comment.