@airporting/tech-app 0.0.59 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mf/9669.js +1 -1
- package/dist/mf/@mf-types/compiled-types/api/tech/etatSaisie/setResponsableMutation.d.ts +1 -1
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/deleteLeadMutation.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/leadDetailQuery.d.ts +2 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/leadsQuery.d.ts +4 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/rescanMutation.d.ts +4 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/updateLeadMutation.d.ts +9 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/LeadDetailDrawer.d.ts +6 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/LeadTimeline.d.ts +4 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/LeadsTable.d.ts +8 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/temperature.d.ts +8 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/types.d.ts +24 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales.app.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/gen/TechApi/index.d.ts +229 -26
- package/dist/mf/@mf-types/compiled-types/tabs/sales.d.ts +2 -0
- package/dist/mf/@mf-types/sales.d.ts +2 -0
- package/dist/mf/@mf-types.d.ts +2 -2
- package/dist/mf/@mf-types.zip +0 -0
- package/dist/mf/__federation_expose_sales.js +1 -0
- package/dist/mf/index.js +3 -3
- package/dist/mf/mf-manifest.json +29 -1
- package/dist/mf/mf-stats.json +45 -6
- package/dist/mf/tech_app.js +3 -3
- package/package.json +1 -1
package/dist/mf/9669.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},4148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{h:()=>useApi});var _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9056);var _src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7936);function useApi(){const config=(0,_src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__.M)();const client=new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eN({baseUrl:config.api.replace(/\/$/,""),baseApiParams:{headers:{Authorization:config.token?`Bearer ${config.token}`:"",From:config.owner}}});return new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eT(client)}},9056:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{eN:()=>HttpClient,eT:()=>TechApi});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class TechApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});getDashboard=(params={})=>this.http.request({path:"/dashboard",method:"GET",format:"json",...params});getCompanies=(params={})=>this.http.request({path:"/companies",method:"GET",format:"json",...params});webhook={postSmsWebhook:(query,params={})=>this.http.request({path:"/sms/webhook",method:"POST",query:query,...params})};amex={getTransactionsV1:(query,params={})=>this.http.request({path:"/v1/amex/transactions",method:"GET",query:query,...params})};etatSaisie={getLatestV1:(params={})=>this.http.request({path:"/v1/etat-saisie/latest",method:"GET",format:"json",...params}),getDossiersV1:(params={})=>this.http.request({path:"/v1/etat-saisie/dossiers",method:"GET",format:"json",...params}),setManagedV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),setResponsableV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}/responsable`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),recomputeV1:(params={})=>this.http.request({path:"/v1/etat-saisie/recompute",method:"POST",format:"json",...params})};financeJobs={getStockV1:(params={})=>this.http.request({path:"/v1/finance-jobs/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/finance-jobs/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/unstick`,method:"POST",format:"json",...params}),retryV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/retry`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params}),runRecipeV1:(data,params={})=>this.http.request({path:"/v1/finance-jobs/run-recipe",method:"POST",body:data,type:"application/json",format:"json",...params}),getRunnersV1:(params={})=>this.http.request({path:"/v1/finance-jobs/runners",method:"GET",format:"json",...params})};github={getJobsRunnersV1:(params={})=>this.http.request({path:"/v1/github/jobs/runners",method:"GET",format:"json",...params}),getLabelsV1:({host,...query},params={})=>this.http.request({path:`/v1/github/labels/${host}`,method:"GET",format:"json",...params}),getJobLogsV1:(query,params={})=>this.http.request({path:"/v1/github/job-logs",method:"GET",query:query,format:"json",...params})};gsheet={getStockV1:(params={})=>this.http.request({path:"/v1/gsheet/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/gsheet/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/unstick`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params})};notion={getKikouV1:(params={})=>this.http.request({path:"/v1/notion/kikou",method:"GET",format:"json",...params})};payfit={getChartV1:(query,params={})=>this.http.request({path:"/v1/payfit/chart",method:"GET",query:query,...params})};sobank={getExportsV1:(query,params={})=>this.http.request({path:"/v1/sobank/exports",method:"GET",query:query,format:"json",...params})};synchro={getRunStatsV1:(params={})=>this.http.request({path:"/v1/synchro/run/stats",method:"GET",format:"json",...params}),getTasksV1:(query,params={})=>this.http.request({path:"/v1/synchro/tasks",method:"GET",query:query,format:"json",...params}),getJobsDefaultsV1:(params={})=>this.http.request({path:"/v1/synchro/jobs/defaults",method:"GET",format:"json",...params}),putStopTaskV1:({id,...query},params={})=>this.http.request({path:`/v1/synchro/tasks/stop/${id}`,method:"PUT",...params}),resetOwnerStatsV1:({owner,value,...query},params={})=>this.http.request({path:`/v1/synchro/run/stats/${owner}/${value}`,method:"PUT",...params})}}},7936:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{$:()=>AppConfigProvider,M:()=>useAppConfig});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3106);const AppConfigCtx=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigProvider=AppConfigCtx.Provider;function useAppConfig(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigProvider />`");return config}},7034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>Providers});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _airporting_app_front__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1380);var _mantine_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(207);var _mantine_modals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4142);var _mantine_notifications__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1455);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6197);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9877);var _hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(7936);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_2__.createTheme)((0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.theme,{components:{}}));const cssVarResolver=x=>(0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.cssVarResolver(x),{dark:{},light:{},variables:{}});function Providers(props){const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__.$,{value:config,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClientProvider,{client:tanstack?.queryClient??new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClient,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_2__.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_modals__WEBPACK_IMPORTED_MODULE_3__.ModalsProvider,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_notifications__WEBPACK_IMPORTED_MODULE_4__.Notifications,{}),children]})})})})}}}]);
|
|
10
|
+
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},4148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{h:()=>useApi});var _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9056);var _src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7936);function useApi(){const config=(0,_src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__.M)();const client=new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eN({baseUrl:config.api.replace(/\/$/,""),baseApiParams:{headers:{Authorization:config.token?`Bearer ${config.token}`:"",From:config.owner}}});return new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eT(client)}},9056:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{eN:()=>HttpClient,eT:()=>TechApi});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class TechApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});getDashboard=(params={})=>this.http.request({path:"/dashboard",method:"GET",format:"json",...params});getCompanies=(params={})=>this.http.request({path:"/companies",method:"GET",format:"json",...params});webhook={postSmsWebhook:(query,params={})=>this.http.request({path:"/sms/webhook",method:"POST",query:query,...params})};amex={getTransactionsV1:(query,params={})=>this.http.request({path:"/v1/amex/transactions",method:"GET",query:query,...params})};etatSaisie={getLatestV1:(params={})=>this.http.request({path:"/v1/etat-saisie/latest",method:"GET",format:"json",...params}),getDossiersV1:(params={})=>this.http.request({path:"/v1/etat-saisie/dossiers",method:"GET",format:"json",...params}),setManagedV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),setResponsableV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}/responsable`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),recomputeV1:(params={})=>this.http.request({path:"/v1/etat-saisie/recompute",method:"POST",format:"json",...params})};sales={listLeadsV1:(params={})=>this.http.request({path:"/v1/sales/leads",method:"GET",format:"json",...params}),getLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"GET",format:"json",...params}),updateLeadV1:({id,...query},data,params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),deleteLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"DELETE",format:"json",...params}),rescanV1:(params={})=>this.http.request({path:"/v1/sales/rescan",method:"POST",format:"json",...params})};financeJobs={getStockV1:(params={})=>this.http.request({path:"/v1/finance-jobs/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/finance-jobs/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/unstick`,method:"POST",format:"json",...params}),retryV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/retry`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params}),runRecipeV1:(data,params={})=>this.http.request({path:"/v1/finance-jobs/run-recipe",method:"POST",body:data,type:"application/json",format:"json",...params}),getRunnersV1:(params={})=>this.http.request({path:"/v1/finance-jobs/runners",method:"GET",format:"json",...params})};github={getJobsRunnersV1:(params={})=>this.http.request({path:"/v1/github/jobs/runners",method:"GET",format:"json",...params}),getLabelsV1:({host,...query},params={})=>this.http.request({path:`/v1/github/labels/${host}`,method:"GET",format:"json",...params}),getJobLogsV1:(query,params={})=>this.http.request({path:"/v1/github/job-logs",method:"GET",query:query,format:"json",...params})};gsheet={getStockV1:(params={})=>this.http.request({path:"/v1/gsheet/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/gsheet/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/unstick`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params})};notion={getKikouV1:(params={})=>this.http.request({path:"/v1/notion/kikou",method:"GET",format:"json",...params})};payfit={getChartV1:(query,params={})=>this.http.request({path:"/v1/payfit/chart",method:"GET",query:query,...params})};sobank={getExportsV1:(query,params={})=>this.http.request({path:"/v1/sobank/exports",method:"GET",query:query,format:"json",...params})};synchro={getRunStatsV1:(params={})=>this.http.request({path:"/v1/synchro/run/stats",method:"GET",format:"json",...params}),getTasksV1:(query,params={})=>this.http.request({path:"/v1/synchro/tasks",method:"GET",query:query,format:"json",...params}),getJobsDefaultsV1:(params={})=>this.http.request({path:"/v1/synchro/jobs/defaults",method:"GET",format:"json",...params}),putStopTaskV1:({id,...query},params={})=>this.http.request({path:`/v1/synchro/tasks/stop/${id}`,method:"PUT",...params}),resetOwnerStatsV1:({owner,value,...query},params={})=>this.http.request({path:`/v1/synchro/run/stats/${owner}/${value}`,method:"PUT",...params})}}},7936:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{$:()=>AppConfigProvider,M:()=>useAppConfig});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3106);const AppConfigCtx=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigProvider=AppConfigCtx.Provider;function useAppConfig(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigProvider />`");return config}},7034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>Providers});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _airporting_app_front__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1380);var _mantine_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(207);var _mantine_modals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4142);var _mantine_notifications__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1455);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6197);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9877);var _hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(7936);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_2__.createTheme)((0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.theme,{components:{}}));const cssVarResolver=x=>(0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.cssVarResolver(x),{dark:{},light:{},variables:{}});function Providers(props){const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__.$,{value:config,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClientProvider,{client:tanstack?.queryClient??new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClient,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_2__.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_modals__WEBPACK_IMPORTED_MODULE_3__.ModalsProvider,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_notifications__WEBPACK_IMPORTED_MODULE_4__.Notifications,{}),children]})})})})}}}]);
|
|
@@ -2,5 +2,5 @@ type SetResponsableVariables = {
|
|
|
2
2
|
id: number;
|
|
3
3
|
notionUserId: number | null;
|
|
4
4
|
};
|
|
5
|
-
export declare function useSetResponsable(): import("@tanstack/react-query").UseMutationResult<import("../../../gen/TechApi/index.ts").
|
|
5
|
+
export declare function useSetResponsable(): import("@tanstack/react-query").UseMutationResult<import("../../../gen/TechApi/index.ts").SetManagedResponse, Error, SetResponsableVariables, unknown>;
|
|
6
6
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDeleteLead(): import("@tanstack/react-query").UseMutationResult<any, any, number, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type UpdateLeadPayload = {
|
|
2
|
+
temperature?: string;
|
|
3
|
+
next_action?: string | null;
|
|
4
|
+
next_action_due_at?: string | null;
|
|
5
|
+
first_name?: string | null;
|
|
6
|
+
last_name?: string | null;
|
|
7
|
+
company?: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare function useUpdateLead(id: number): import("@tanstack/react-query").UseMutationResult<any, any, UpdateLeadPayload, unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LeadListItem, Temperature } from '@/src/apps/sales/types.ts';
|
|
2
|
+
type Props = {
|
|
3
|
+
leads: LeadListItem[];
|
|
4
|
+
temperatureFilter: Temperature | null;
|
|
5
|
+
onRowClick: (id: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function LeadsTable({ leads, temperatureFilter, onRowClick }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Temperature } from '@/src/apps/sales/types.ts';
|
|
2
|
+
export type TemperatureMeta = {
|
|
3
|
+
emoji: string;
|
|
4
|
+
label: string;
|
|
5
|
+
order: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const TEMPERATURE_META: Record<Temperature, TemperatureMeta>;
|
|
8
|
+
export declare const TEMPERATURE_ORDER: Temperature[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Temperature = 'burning' | 'hot' | 'warm' | 'cold' | 'frozen';
|
|
2
|
+
export type LeadListItem = {
|
|
3
|
+
id: number;
|
|
4
|
+
first_name: string | null;
|
|
5
|
+
last_name: string | null;
|
|
6
|
+
company: string | null;
|
|
7
|
+
last_contact_at: string | null;
|
|
8
|
+
temperature: Temperature;
|
|
9
|
+
next_action: string | null;
|
|
10
|
+
next_action_due_at: string | null;
|
|
11
|
+
manual_override: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type InteractionItem = {
|
|
14
|
+
id: number;
|
|
15
|
+
source: string;
|
|
16
|
+
channel: string | null;
|
|
17
|
+
direction: 'inbound' | 'outbound';
|
|
18
|
+
occurred_at: string;
|
|
19
|
+
summary: string | null;
|
|
20
|
+
external_url: string | null;
|
|
21
|
+
};
|
|
22
|
+
export type LeadDetail = LeadListItem & {
|
|
23
|
+
interactions: InteractionItem[];
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SalesApp(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export interface BraintreeConnectorItem {
|
|
2
|
+
isTooOld: boolean;
|
|
3
|
+
lastTime: string;
|
|
4
|
+
merchant: string;
|
|
5
|
+
}
|
|
1
6
|
export interface CompanyItem {
|
|
2
7
|
display_name: string | null;
|
|
3
8
|
id: number;
|
|
@@ -7,6 +12,9 @@ export interface DeleteFinanceJobsRedisLockResponse {
|
|
|
7
12
|
key: string;
|
|
8
13
|
ok: boolean;
|
|
9
14
|
}
|
|
15
|
+
export interface DeleteLeadV1Params {
|
|
16
|
+
id: number;
|
|
17
|
+
}
|
|
10
18
|
export interface DeleteRedisLockResponse {
|
|
11
19
|
existed: boolean;
|
|
12
20
|
key: string;
|
|
@@ -49,12 +57,6 @@ export interface EtatSaisieDossierLine {
|
|
|
49
57
|
total_clients_eur: number;
|
|
50
58
|
total_fournisseurs_eur: number;
|
|
51
59
|
}
|
|
52
|
-
export interface ResponsableOption {
|
|
53
|
-
avatar_url: string;
|
|
54
|
-
email: string;
|
|
55
|
-
id: number;
|
|
56
|
-
name: string;
|
|
57
|
-
}
|
|
58
60
|
export interface EtatSaisieDossierMapItem {
|
|
59
61
|
airporting_id: number;
|
|
60
62
|
display_name: string;
|
|
@@ -201,22 +203,17 @@ export interface GetDashboardBnppResponse {
|
|
|
201
203
|
factorTodayTotal: number;
|
|
202
204
|
globalProblem: boolean;
|
|
203
205
|
}
|
|
206
|
+
export interface GetDashboardBraintreeResponse {
|
|
207
|
+
connectors: BraintreeConnectorItem[];
|
|
208
|
+
}
|
|
204
209
|
export interface GetDashboardPennylaneResponse {
|
|
205
210
|
isTooOld: boolean;
|
|
206
211
|
lastTime: string;
|
|
207
212
|
}
|
|
208
|
-
export interface BraintreeConnectorItem {
|
|
209
|
-
merchant: string;
|
|
210
|
-
lastTime: string;
|
|
211
|
-
isTooOld: boolean;
|
|
212
|
-
}
|
|
213
|
-
export interface GetDashboardBraintreeResponse {
|
|
214
|
-
connectors: BraintreeConnectorItem[];
|
|
215
|
-
}
|
|
216
213
|
export interface GetDashboardResponse {
|
|
217
214
|
amex: GetDashboardAmexResponse;
|
|
218
|
-
braintree: GetDashboardBraintreeResponse;
|
|
219
215
|
bnpp: GetDashboardBnppResponse;
|
|
216
|
+
braintree: GetDashboardBraintreeResponse;
|
|
220
217
|
gsheet: GetGsheetDashboardResponse;
|
|
221
218
|
notion: GetNotionDashboardResponse;
|
|
222
219
|
payfit: GetPayfitDashboardResponse;
|
|
@@ -320,6 +317,9 @@ export interface GetJobsDefaultResponse {
|
|
|
320
317
|
export interface GetLabelsV1Params {
|
|
321
318
|
host: string;
|
|
322
319
|
}
|
|
320
|
+
export interface GetLeadV1Params {
|
|
321
|
+
id: number;
|
|
322
|
+
}
|
|
323
323
|
export interface GetNotionDashboardResponse {
|
|
324
324
|
bugs: string[][];
|
|
325
325
|
users: NotionUser[];
|
|
@@ -331,6 +331,21 @@ export interface GetPayfitDashboardResponse {
|
|
|
331
331
|
export interface GetRunStatsResponse {
|
|
332
332
|
currentJobsCounters: UsersRunStatsResponse;
|
|
333
333
|
}
|
|
334
|
+
export interface GetSalesLeadResponse {
|
|
335
|
+
company: string | null;
|
|
336
|
+
first_name: string | null;
|
|
337
|
+
id: number;
|
|
338
|
+
interactions: SalesInteractionItem[];
|
|
339
|
+
last_contact_at: string | null;
|
|
340
|
+
last_name: string | null;
|
|
341
|
+
manual_override: boolean;
|
|
342
|
+
next_action: string | null;
|
|
343
|
+
next_action_due_at: string | null;
|
|
344
|
+
temperature: string;
|
|
345
|
+
}
|
|
346
|
+
export interface GetSalesLeadsResponse {
|
|
347
|
+
leads: SalesLeadListItem[];
|
|
348
|
+
}
|
|
334
349
|
export interface GetSynchroDashboardResponse {
|
|
335
350
|
askedToday: number;
|
|
336
351
|
errorsToday: number;
|
|
@@ -418,6 +433,7 @@ export interface ListTasksV1Params {
|
|
|
418
433
|
company_slug: string;
|
|
419
434
|
job_name: string;
|
|
420
435
|
owner: string;
|
|
436
|
+
period: string;
|
|
421
437
|
skip: string;
|
|
422
438
|
state: string;
|
|
423
439
|
take: string;
|
|
@@ -438,6 +454,9 @@ export interface NotionUser {
|
|
|
438
454
|
email: string;
|
|
439
455
|
name: string;
|
|
440
456
|
}
|
|
457
|
+
export interface OkResponse {
|
|
458
|
+
ok: boolean;
|
|
459
|
+
}
|
|
441
460
|
export interface PayfitDashboardItem {
|
|
442
461
|
siretsCount: number;
|
|
443
462
|
sum: number;
|
|
@@ -452,10 +471,20 @@ export interface RecomputeEtatSaisieResponse {
|
|
|
452
471
|
message: string;
|
|
453
472
|
ok: boolean;
|
|
454
473
|
}
|
|
474
|
+
export interface RescanResponse {
|
|
475
|
+
message: string;
|
|
476
|
+
ok: boolean;
|
|
477
|
+
}
|
|
455
478
|
export interface ResetOwnerStatsV1Params {
|
|
456
479
|
owner: string;
|
|
457
480
|
value: string;
|
|
458
481
|
}
|
|
482
|
+
export interface ResponsableOption {
|
|
483
|
+
avatar_url: string;
|
|
484
|
+
email: string;
|
|
485
|
+
id: number;
|
|
486
|
+
name: string;
|
|
487
|
+
}
|
|
459
488
|
export interface RetryV1Params {
|
|
460
489
|
id: number;
|
|
461
490
|
}
|
|
@@ -467,6 +496,26 @@ export interface RunRecipeResponse {
|
|
|
467
496
|
message?: string;
|
|
468
497
|
ok: boolean;
|
|
469
498
|
}
|
|
499
|
+
export interface SalesInteractionItem {
|
|
500
|
+
channel: string | null;
|
|
501
|
+
direction: string;
|
|
502
|
+
external_url: string | null;
|
|
503
|
+
id: number;
|
|
504
|
+
occurred_at: string;
|
|
505
|
+
source: string;
|
|
506
|
+
summary: string | null;
|
|
507
|
+
}
|
|
508
|
+
export interface SalesLeadListItem {
|
|
509
|
+
company: string | null;
|
|
510
|
+
first_name: string | null;
|
|
511
|
+
id: number;
|
|
512
|
+
last_contact_at: string | null;
|
|
513
|
+
last_name: string | null;
|
|
514
|
+
manual_override: boolean;
|
|
515
|
+
next_action: string | null;
|
|
516
|
+
next_action_due_at: string | null;
|
|
517
|
+
temperature: string;
|
|
518
|
+
}
|
|
470
519
|
export interface SetFinanceJobsOwnerBody {
|
|
471
520
|
owner: string;
|
|
472
521
|
}
|
|
@@ -476,27 +525,24 @@ export interface SetGsheetOwnerBody {
|
|
|
476
525
|
export interface SetManagedBody {
|
|
477
526
|
managed: boolean;
|
|
478
527
|
}
|
|
479
|
-
export interface SetResponsableBody {
|
|
480
|
-
notion_user_id: number | null;
|
|
481
|
-
}
|
|
482
528
|
export interface SetManagedResponse {
|
|
483
529
|
ok: boolean;
|
|
484
530
|
}
|
|
485
|
-
export interface SetResponsableResponse {
|
|
486
|
-
ok: boolean;
|
|
487
|
-
}
|
|
488
531
|
export interface SetManagedV1Params {
|
|
489
532
|
id: number;
|
|
490
533
|
}
|
|
491
|
-
export interface SetResponsableV1Params {
|
|
492
|
-
id: number;
|
|
493
|
-
}
|
|
494
534
|
export interface SetOwnerV1Params {
|
|
495
535
|
id: number;
|
|
496
536
|
}
|
|
497
537
|
export interface SetOwnerV1Params2 {
|
|
498
538
|
id: number;
|
|
499
539
|
}
|
|
540
|
+
export interface SetResponsableBody {
|
|
541
|
+
notion_user_id: number | null;
|
|
542
|
+
}
|
|
543
|
+
export interface SetResponsableV1Params {
|
|
544
|
+
id: number;
|
|
545
|
+
}
|
|
500
546
|
export interface SobankExportItem {
|
|
501
547
|
account: string;
|
|
502
548
|
balance: number;
|
|
@@ -539,6 +585,17 @@ export interface UnstickV1Params {
|
|
|
539
585
|
export interface UnstickV1Params2 {
|
|
540
586
|
id: number;
|
|
541
587
|
}
|
|
588
|
+
export interface UpdateLeadV1Params {
|
|
589
|
+
id: number;
|
|
590
|
+
}
|
|
591
|
+
export interface UpdateSalesLeadBody {
|
|
592
|
+
company?: string | null;
|
|
593
|
+
first_name?: string | null;
|
|
594
|
+
last_name?: string | null;
|
|
595
|
+
next_action?: string | null;
|
|
596
|
+
next_action_due_at?: string | null;
|
|
597
|
+
temperature?: string;
|
|
598
|
+
}
|
|
542
599
|
export interface UserItemRunStats {
|
|
543
600
|
db: number;
|
|
544
601
|
redis: number;
|
|
@@ -633,6 +690,22 @@ export declare namespace EtatSaisie {
|
|
|
633
690
|
type RequestHeaders = {};
|
|
634
691
|
type ResponseBody = SetManagedResponse;
|
|
635
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* No description
|
|
695
|
+
* @tags EtatSaisie
|
|
696
|
+
* @name SetResponsableV1
|
|
697
|
+
* @request PATCH:/v1/etat-saisie/dossiers/{id}/responsable
|
|
698
|
+
* @response `200` `SetManagedResponse`
|
|
699
|
+
*/
|
|
700
|
+
namespace SetResponsableV1 {
|
|
701
|
+
type RequestParams = {
|
|
702
|
+
id: number;
|
|
703
|
+
};
|
|
704
|
+
type RequestQuery = {};
|
|
705
|
+
type RequestBody = SetResponsableBody;
|
|
706
|
+
type RequestHeaders = {};
|
|
707
|
+
type ResponseBody = SetManagedResponse;
|
|
708
|
+
}
|
|
636
709
|
/**
|
|
637
710
|
* No description
|
|
638
711
|
* @tags EtatSaisie
|
|
@@ -648,6 +721,88 @@ export declare namespace EtatSaisie {
|
|
|
648
721
|
type ResponseBody = RecomputeEtatSaisieResponse;
|
|
649
722
|
}
|
|
650
723
|
}
|
|
724
|
+
export declare namespace Sales {
|
|
725
|
+
/**
|
|
726
|
+
* No description
|
|
727
|
+
* @tags Sales
|
|
728
|
+
* @name ListLeadsV1
|
|
729
|
+
* @request GET:/v1/sales/leads
|
|
730
|
+
* @response `200` `GetSalesLeadsResponse`
|
|
731
|
+
*/
|
|
732
|
+
namespace ListLeadsV1 {
|
|
733
|
+
type RequestParams = {};
|
|
734
|
+
type RequestQuery = {};
|
|
735
|
+
type RequestBody = never;
|
|
736
|
+
type RequestHeaders = {};
|
|
737
|
+
type ResponseBody = GetSalesLeadsResponse;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* No description
|
|
741
|
+
* @tags Sales
|
|
742
|
+
* @name GetLeadV1
|
|
743
|
+
* @request GET:/v1/sales/leads/{id}
|
|
744
|
+
* @response `200` `GetSalesLeadResponse`
|
|
745
|
+
*/
|
|
746
|
+
namespace GetLeadV1 {
|
|
747
|
+
type RequestParams = {
|
|
748
|
+
id: number;
|
|
749
|
+
};
|
|
750
|
+
type RequestQuery = {};
|
|
751
|
+
type RequestBody = never;
|
|
752
|
+
type RequestHeaders = {};
|
|
753
|
+
type ResponseBody = GetSalesLeadResponse;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* No description
|
|
757
|
+
* @tags Sales
|
|
758
|
+
* @name UpdateLeadV1
|
|
759
|
+
* @request PATCH:/v1/sales/leads/{id}
|
|
760
|
+
* @response `200` `OkResponse`
|
|
761
|
+
*/
|
|
762
|
+
namespace UpdateLeadV1 {
|
|
763
|
+
type RequestParams = {
|
|
764
|
+
id: number;
|
|
765
|
+
};
|
|
766
|
+
type RequestQuery = {};
|
|
767
|
+
type RequestBody = UpdateSalesLeadBody;
|
|
768
|
+
type RequestHeaders = {
|
|
769
|
+
from: string;
|
|
770
|
+
};
|
|
771
|
+
type ResponseBody = OkResponse;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* No description
|
|
775
|
+
* @tags Sales
|
|
776
|
+
* @name DeleteLeadV1
|
|
777
|
+
* @request DELETE:/v1/sales/leads/{id}
|
|
778
|
+
* @response `200` `OkResponse`
|
|
779
|
+
*/
|
|
780
|
+
namespace DeleteLeadV1 {
|
|
781
|
+
type RequestParams = {
|
|
782
|
+
id: number;
|
|
783
|
+
};
|
|
784
|
+
type RequestQuery = {};
|
|
785
|
+
type RequestBody = never;
|
|
786
|
+
type RequestHeaders = {
|
|
787
|
+
from: string;
|
|
788
|
+
};
|
|
789
|
+
type ResponseBody = OkResponse;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* No description
|
|
793
|
+
* @tags Sales
|
|
794
|
+
* @name RescanV1
|
|
795
|
+
* @request POST:/v1/sales/rescan
|
|
796
|
+
* @response `201` `RescanResponse`
|
|
797
|
+
*/
|
|
798
|
+
namespace RescanV1 {
|
|
799
|
+
type RequestParams = {};
|
|
800
|
+
type RequestQuery = {};
|
|
801
|
+
type RequestBody = never;
|
|
802
|
+
type RequestHeaders = {};
|
|
803
|
+
type ResponseBody = RescanResponse;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
651
806
|
export declare namespace FinanceJobs {
|
|
652
807
|
/**
|
|
653
808
|
* No description
|
|
@@ -677,6 +832,7 @@ export declare namespace FinanceJobs {
|
|
|
677
832
|
company_slug: string;
|
|
678
833
|
job_name: string;
|
|
679
834
|
owner: string;
|
|
835
|
+
period: string;
|
|
680
836
|
skip: string;
|
|
681
837
|
state: string;
|
|
682
838
|
take: string;
|
|
@@ -1237,9 +1393,9 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
1237
1393
|
* @tags EtatSaisie
|
|
1238
1394
|
* @name SetResponsableV1
|
|
1239
1395
|
* @request PATCH:/v1/etat-saisie/dossiers/{id}/responsable
|
|
1240
|
-
* @response `200` `
|
|
1396
|
+
* @response `200` `SetManagedResponse`
|
|
1241
1397
|
*/
|
|
1242
|
-
setResponsableV1: ({ id, ...query }: SetResponsableV1Params, data: SetResponsableBody, params?: RequestParams) => Promise<HttpResponse<
|
|
1398
|
+
setResponsableV1: ({ id, ...query }: SetResponsableV1Params, data: SetResponsableBody, params?: RequestParams) => Promise<HttpResponse<SetManagedResponse, any>>;
|
|
1243
1399
|
/**
|
|
1244
1400
|
* No description
|
|
1245
1401
|
*
|
|
@@ -1250,6 +1406,53 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
1250
1406
|
*/
|
|
1251
1407
|
recomputeV1: (params?: RequestParams) => Promise<HttpResponse<RecomputeEtatSaisieResponse, any>>;
|
|
1252
1408
|
};
|
|
1409
|
+
sales: {
|
|
1410
|
+
/**
|
|
1411
|
+
* No description
|
|
1412
|
+
*
|
|
1413
|
+
* @tags Sales
|
|
1414
|
+
* @name ListLeadsV1
|
|
1415
|
+
* @request GET:/v1/sales/leads
|
|
1416
|
+
* @response `200` `GetSalesLeadsResponse`
|
|
1417
|
+
*/
|
|
1418
|
+
listLeadsV1: (params?: RequestParams) => Promise<HttpResponse<GetSalesLeadsResponse, any>>;
|
|
1419
|
+
/**
|
|
1420
|
+
* No description
|
|
1421
|
+
*
|
|
1422
|
+
* @tags Sales
|
|
1423
|
+
* @name GetLeadV1
|
|
1424
|
+
* @request GET:/v1/sales/leads/{id}
|
|
1425
|
+
* @response `200` `GetSalesLeadResponse`
|
|
1426
|
+
*/
|
|
1427
|
+
getLeadV1: ({ id, ...query }: GetLeadV1Params, params?: RequestParams) => Promise<HttpResponse<GetSalesLeadResponse, any>>;
|
|
1428
|
+
/**
|
|
1429
|
+
* No description
|
|
1430
|
+
*
|
|
1431
|
+
* @tags Sales
|
|
1432
|
+
* @name UpdateLeadV1
|
|
1433
|
+
* @request PATCH:/v1/sales/leads/{id}
|
|
1434
|
+
* @response `200` `OkResponse`
|
|
1435
|
+
*/
|
|
1436
|
+
updateLeadV1: ({ id, ...query }: UpdateLeadV1Params, data: UpdateSalesLeadBody, params?: RequestParams) => Promise<HttpResponse<OkResponse, any>>;
|
|
1437
|
+
/**
|
|
1438
|
+
* No description
|
|
1439
|
+
*
|
|
1440
|
+
* @tags Sales
|
|
1441
|
+
* @name DeleteLeadV1
|
|
1442
|
+
* @request DELETE:/v1/sales/leads/{id}
|
|
1443
|
+
* @response `200` `OkResponse`
|
|
1444
|
+
*/
|
|
1445
|
+
deleteLeadV1: ({ id, ...query }: DeleteLeadV1Params, params?: RequestParams) => Promise<HttpResponse<OkResponse, any>>;
|
|
1446
|
+
/**
|
|
1447
|
+
* No description
|
|
1448
|
+
*
|
|
1449
|
+
* @tags Sales
|
|
1450
|
+
* @name RescanV1
|
|
1451
|
+
* @request POST:/v1/sales/rescan
|
|
1452
|
+
* @response `201` `RescanResponse`
|
|
1453
|
+
*/
|
|
1454
|
+
rescanV1: (params?: RequestParams) => Promise<HttpResponse<RescanResponse, any>>;
|
|
1455
|
+
};
|
|
1253
1456
|
financeJobs: {
|
|
1254
1457
|
/**
|
|
1255
1458
|
* No description
|
package/dist/mf/@mf-types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/sobank' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/wise';
|
|
3
|
-
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/sobank' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sobank') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
|
|
2
|
+
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/sales' | 'REMOTE_ALIAS_IDENTIFIER/sobank' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/wise';
|
|
3
|
+
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/sobank' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sobank') :T extends 'REMOTE_ALIAS_IDENTIFIER/sales' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sales') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
|
package/dist/mf/@mf-types.zip
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["610"],{9848:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Sales});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var providers=__webpack_require__(7034);var index_mjs_=__webpack_require__(207);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useSalesLeads(){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","sales","leads"],queryFn:async()=>(await api.sales.listLeadsV1()).data,refetchOnWindowFocus:true})}var esm_index_mjs_=__webpack_require__(1455);function useSalesRescan(){const api=(0,useApi.h)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async()=>(await api.sales.rescanV1()).data,onSuccess:data=>{esm_index_mjs_.notifications.show({title:"Re-scan",message:data?.message??"Re-scan lanc\xe9",color:data?.ok?"green":"orange"});queryClient.invalidateQueries({queryKey:["tech","sales"]})},onError:err=>{esm_index_mjs_.notifications.show({title:"Re-scan",message:err?.error?.error??err?.message??"\xc9chec du re-scan",color:"red"})}})}const TEMPERATURE_META={burning:{emoji:"\uD83D\uDD25\uD83D\uDD25",label:"Br\xfblant",order:5},hot:{emoji:"\uD83D\uDD25",label:"Chaud",order:4},warm:{emoji:"\uD83C\uDF21️",label:"Ti\xe8de",order:3},cold:{emoji:"❄️",label:"Froid",order:2},frozen:{emoji:"\uD83E\uDDCA",label:"Gel\xe9",order:1}};const TEMPERATURE_ORDER=["burning","hot","warm","cold","frozen"];function dueLabel(value){if(!value)return"Pas de date fix\xe9e";return new Date(value).toLocaleDateString("fr-FR",{timeZone:"Europe/Paris"})}function compare(a,b,key,desc){let av;let bv;if("temperature"===key){av=TEMPERATURE_META[a.temperature].order;bv=TEMPERATURE_META[b.temperature].order}else{av=a[key]?new Date(a[key]).getTime():0;bv=b[key]?new Date(b[key]).getTime():0}if(desc)return bv-av;return av-bv}function LeadsTable({leads,temperatureFilter,onRowClick}){const[sortKey,setSortKey]=(0,index_js_.useState)("last_contact_at");const[desc,setDesc]=(0,index_js_.useState)(true);function toggleSort(key){if(key===sortKey)setDesc(d=>!d);else{setSortKey(key);setDesc(true)}}const rows=(0,index_js_.useMemo)(()=>{const filtered=temperatureFilter?leads.filter(l=>l.temperature===temperatureFilter):leads;return[...filtered].sort((a,b)=>compare(a,b,sortKey,desc))},[leads,temperatureFilter,sortKey,desc]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{highlightOnHover:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.UnstyledButton,{onClick:()=>toggleSort("temperature"),children:"Temp\xe9rature"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Pr\xe9nom"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Nom"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Entreprise"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.UnstyledButton,{onClick:()=>toggleSort("last_contact_at"),children:"Dernier contact"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Prochaine action"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.UnstyledButton,{onClick:()=>toggleSort("next_action_due_at"),children:"\xc9ch\xe9ance"})})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:rows.map(l=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{style:{cursor:"pointer"},onClick:()=>onRowClick(l.id),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:TEMPERATURE_META[l.temperature].emoji}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:l.first_name??""}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:l.last_name??""}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:l.company??""}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:l.last_contact_at?new Date(l.last_contact_at).toLocaleDateString("fr-FR",{timeZone:"Europe/Paris"}):"—"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:l.next_action??"—"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",c:l.next_action_due_at?void 0:"dimmed",children:dueLabel(l.next_action_due_at)})})]},l.id))})]})}function useSalesLead(id){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","sales","lead",id],enabled:null!==id,queryFn:async()=>(await api.sales.getLeadV1(id)).data})}function useUpdateLead(id){const api=(0,useApi.h)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async payload=>(await api.sales.updateLeadV1(id,payload)).data,onSuccess:()=>{esm_index_mjs_.notifications.show({title:"Lead",message:"Modifications enregistr\xe9es",color:"green"});queryClient.invalidateQueries({queryKey:["tech","sales"]})},onError:err=>{esm_index_mjs_.notifications.show({title:"Lead",message:err?.error?.error??err?.message??"\xc9chec de la mise \xe0 jour",color:"red"})}})}function useDeleteLead(){const api=(0,useApi.h)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async id=>(await api.sales.deleteLeadV1(id)).data,onSuccess:()=>{esm_index_mjs_.notifications.show({title:"Lead",message:"Lead supprim\xe9",color:"green"});queryClient.invalidateQueries({queryKey:["tech","sales"]})},onError:err=>{esm_index_mjs_.notifications.show({title:"Lead",message:err?.error?.error??err?.message??"\xc9chec de la suppression",color:"red"})}})}function directionLabel(direction){if("inbound"===direction)return"↘ Entrant";return"↗ Sortant"}function LeadTimeline({items}){if(0===items.length)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"Aucun \xe9change."});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Timeline,{active:items.length,bulletSize:14,lineWidth:2,children:items.map(it=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Timeline.Item,{title:it.summary??"(sans r\xe9sum\xe9)",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"xs",mb:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{size:"xs",variant:"light",children:it.source}),it.channel?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{size:"xs",variant:"outline",children:it.channel}):null,/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:directionLabel(it.direction)})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:2,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:new Date(it.occurred_at).toLocaleString("fr-FR",{timeZone:"Europe/Paris"})}),it.external_url?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{href:it.external_url,target:"_blank",size:"xs",children:"Ouvrir la source"}):null]})]},it.id))})}function LeadDetailDrawer({leadId,onClose}){const detail=useSalesLead(leadId);const update=useUpdateLead(leadId??0);const remove=useDeleteLead();const[temperature,setTemperature]=(0,index_js_.useState)(null);const[nextAction,setNextAction]=(0,index_js_.useState)("");const[dueAt,setDueAt]=(0,index_js_.useState)("");(0,index_js_.useEffect)(()=>{if(detail.data){setTemperature(detail.data.temperature);setNextAction(detail.data.next_action??"");setDueAt(detail.data.next_action_due_at??"")}},[detail.data]);function save(){update.mutate({temperature:temperature??void 0,next_action:""===nextAction?null:nextAction,next_action_due_at:""===dueAt?null:dueAt})}function handleDelete(){if(null===leadId)return;remove.mutate(leadId,{onSuccess:onClose})}return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Drawer,{opened:null!==leadId,onClose:onClose,position:"right",size:"lg",title:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,children:"Lead"}),children:[detail.isLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Loader,{}):null,detail.data?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"Prochaine action",value:nextAction,onChange:e=>setNextAction(e.currentTarget.value),flex:1}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"\xc9ch\xe9ance (ISO)",placeholder:"Pas de date fix\xe9e",value:dueAt,onChange:e=>setDueAt(e.currentTarget.value)})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Select,{label:"Temp\xe9rature",data:TEMPERATURE_ORDER.map(t=>({value:t,label:`${TEMPERATURE_META[t].emoji} ${TEMPERATURE_META[t].label}`})),value:temperature,onChange:setTemperature}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{color:"red",variant:"light",onClick:handleDelete,children:"Supprimer"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{loading:update.isPending,onClick:save,children:"Enregistrer"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:5,mt:"md",children:"Historique"}),/*#__PURE__*/(0,jsx_runtime.jsx)(LeadTimeline,{items:detail.data.interactions})]}):null]})}function SalesApp(){const leads=useSalesLeads();const rescan=useSalesRescan();const[selectedId,setSelectedId]=(0,index_js_.useState)(null);const[temperatureFilter,setTemperatureFilter]=(0,index_js_.useState)(null);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{fluid:true,my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",mb:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,children:"Sales"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Select,{placeholder:"Toutes temp\xe9ratures",clearable:true,data:TEMPERATURE_ORDER.map(t=>({value:t,label:`${TEMPERATURE_META[t].emoji} ${TEMPERATURE_META[t].label}`})),value:temperatureFilter,onChange:v=>setTemperatureFilter(v)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{loading:rescan.isPending,onClick:()=>rescan.mutate(),variant:"light",children:"Re-scanner"})]})]}),leads.isLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Loader,{}):null,leads.data?/*#__PURE__*/(0,jsx_runtime.jsx)(LeadsTable,{leads:leads.data.leads,temperatureFilter:temperatureFilter,onRowClick:setSelectedId}):null,/*#__PURE__*/(0,jsx_runtime.jsx)(LeadDetailDrawer,{leadId:selectedId,onClose:()=>setSelectedId(null)})]})}function Sales(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_js_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(providers.C,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(SalesApp,{})})})}}}]);
|