Please enable JavaScript.
Coggle requires JavaScript to display documents.
ESA Store, start, value=%name|%department|%request_time|%request…
ESA Store
start
?store
next
?store=add
calc
%create_at=date("d.m.Y H:m",%sys.timestamp)
next
$SYS.GET
ANSWER
%response
QUESTION
apikey=%bot.gs_apikey
name=%name
department=%department
create_at=%create_at
type=%request_type
deadline=%request_deadline
comment=%request_comment
screenshot=%request_screenshot
tg_login=%sys.username
tg_id=%sys.extuid
returning=true
action=add_task
priority=%request_priority
%bot.gs_url
next
2 more items...
?store=endTask
next
$SYS.GET
%bot.gs_url
next
else
1 more item...
?response.error
#
ANSWER
%response
QUESTION
apikey=%bot.gs_apikey
returning=true
action=end_task
taskId=%taskId
?store=changePrior
next
$SYS.GET
%bot.gs_url
next
else
1 more item...
?response.error
#
ANSWER
%response
QUESTION
apikey=%bot.gs_apikey
returning=true
action=change_priority
taskId=%taskId
priority=%request_priority
?store=saveReview
next
$SYS.GET
%bot.gs_url
next
else
1 more item...
?response.error
#
ANSWER
%response
QUESTION
apikey=%bot.gs_apikey
returning=true
action=save_review
taskId=%taskId
rv_rate=%rate
rv_comment=%comment
?store=takeTask
next
$SYS.GET
%bot.gs_url
next
else
1 more item...
?response.error
#
ANSWER
%response
QUESTION
apikey=%bot.gs_apikey
returning=true
action=take_task
taskId=%taskId
else
next
root
?ERROR_HANDLE
next
%text=...🛑 Сталася помилка при виконані операції! Помилка надіслана команді розробників.
Текст помилки: %response.message
...%text
next
%text=null
%response=null
root
start
else
next
root
?store
next
?store=endTask
next
calc
%rowNum=%taskId+1
$SYS.POST
https://api.pipe.bot/docs/spreadsheets/update
next
%rowNum=null
2 more items...
QUESTION
doc=%bot.ss_doc
value=Виконано
range=%bot.ss_table!I%rowNum
ANSWER
?store=add
next
$SYS.POST
QUESTION
range=%bot.ss_table!A2
value=%name|%department|%request_time|%request_type|%request_priority|%request_deadline|%request_comment|%request_screenshot|Нове|%sys.username|%sys.extuid
doc=%bot.ss_doc
ANSWER
%rowId
https://api.pipe.bot/docs/spreadsheets/insert
next
calc
%taskId=%rowId-1
next
3 more items...
calc
%request_time=date("d.m.Y H:m",%sys.timestamp)
?store=takeTask
next
%newTaskActionButton=[{"text":"Закрити задачу ✅","callback_data":"nid&tUid=%tUid&taskId=%taskId&data=finishTask"}]
%temp=$[
?(@.id
=="%taskId")] %bot.tasks
$.reply_markup.inline_keyboard[0] %temp set(%newTaskActionButton)
$[
?(@.id
=="%taskId")] %bot.tasks set(%temp)
next
%store=null
%temp=null
%newTaskActionButton=null
end
?store=changePrior
next
calc
%rowNum=%taskId+1
$SYS.POST
https://api.pipe.bot/docs/spreadsheets/update
next
?request_priority=Середній
1 more item...
else
1 more item...
?request_priority=Високий
1 more item...
QUESTION
doc=%bot.ss_doc
value=%request_priority
range=%bot.ss_table!E%rowNum
ANSWER
?store=saveReview
next
calc
%rowNum=%taskId+1
$SYS.POST
https://api.pipe.bot/docs/spreadsheets/insert
next
%rowNum=null
%store=null
1 more item...
QUESTION
doc=%bot.ss_doc
value=%rate|%comment
range=%bot.ss_table!L%rowNum
ANSWER
value=%name|%department|%request_time|%request_type|%request_priority|%request_deadline|%request_comment|%request_screenshot|Нове|%sys.username|%sys.extuid
"name","department","create_at","type","priority","deadline","comment","screenshot","status","tg_login","tg_id","rv_rate","rv_comment"