Kintone plugin 実装
This commit is contained in:
27
plugin/kintone-addins/src/index.ts
Normal file
27
plugin/kintone-addins/src/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
// export const sum = (a: number, b: number) => {
|
||||
// if ('development' === process.env.NODE_ENV) {
|
||||
// console.log('boop');
|
||||
// }
|
||||
// return a + b;
|
||||
// };
|
||||
import $ from 'jquery';
|
||||
import { ActionProcess } from './types/action-process';
|
||||
import { ActionFlow } from './types/ActionTypes';
|
||||
import { FlowInfo } from './types/flowSetting';
|
||||
|
||||
declare const alcflow : {
|
||||
[key:string]:FlowInfo
|
||||
};
|
||||
|
||||
$(function (){
|
||||
const events=Object.keys(alcflow);
|
||||
kintone.events.on(events,(event:any)=>{
|
||||
const flowinfo = alcflow[event.type];
|
||||
const flow=ActionFlow.fromJSON(flowinfo.content);
|
||||
if(flow!==undefined){
|
||||
const process = new ActionProcess(event.type,flow,event);
|
||||
process.exec();
|
||||
}
|
||||
return event;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user