@airporting/tech-app 0.0.43 → 0.0.45
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/latestQuery.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/etatSaisie/recomputeMutation.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/apps/etat-saisie/DetailTable.d.ts +9 -0
- package/dist/mf/@mf-types/compiled-types/apps/etat-saisie.app.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/components/PageHeader.d.ts +12 -0
- package/dist/mf/@mf-types/compiled-types/gen/TechApi/index.d.ts +144 -0
- package/dist/mf/@mf-types/compiled-types/tabs/etat-saisie.d.ts +2 -0
- package/dist/mf/@mf-types/etat-saisie.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_dashboard.js +1 -1
- package/dist/mf/__federation_expose_etat_saisie.js +1 -0
- package/dist/mf/__federation_expose_github.js +1 -1
- package/dist/mf/__federation_expose_sobank.js +1 -1
- package/dist/mf/index.js +3 -3
- package/dist/mf/mf-manifest.json +25 -1
- package/dist/mf/mf-stats.json +38 -5
- 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})};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}),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]})})})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useEtatSaisieLatest(): import("@tanstack/react-query").UseQueryResult<import("../../../gen/TechApi/index.ts").GetEtatSaisieLatestResponse, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useEtatSaisieRecompute(): import("@tanstack/react-query").UseMutationResult<import("../../../gen/TechApi/index.ts").RecomputeEtatSaisieResponse, Error, void, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EtatSaisieApp(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
badge?: ReactNode;
|
|
5
|
+
updatedAt?: number;
|
|
6
|
+
isFetching?: boolean;
|
|
7
|
+
isError?: boolean;
|
|
8
|
+
onRefresh?: () => void;
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare function PageHeader({ title, badge, updatedAt, isFetching, isError, onRefresh, actions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -24,6 +24,83 @@ export interface DiscardV1Params {
|
|
|
24
24
|
export interface DiscardV1Params2 {
|
|
25
25
|
id: number;
|
|
26
26
|
}
|
|
27
|
+
export interface EtatSaisieCustomerRow {
|
|
28
|
+
client: string;
|
|
29
|
+
devise: string;
|
|
30
|
+
dossier: string;
|
|
31
|
+
nb_ecritures: number;
|
|
32
|
+
solde_crediteur_eur: number;
|
|
33
|
+
source: string;
|
|
34
|
+
}
|
|
35
|
+
export interface EtatSaisieDossierLine {
|
|
36
|
+
dossier: string;
|
|
37
|
+
gla_active: boolean;
|
|
38
|
+
last_entry_date: string | null;
|
|
39
|
+
solde_attente_eur: number;
|
|
40
|
+
source: string;
|
|
41
|
+
status: string;
|
|
42
|
+
total_clients_eur: number;
|
|
43
|
+
total_fournisseurs_eur: number;
|
|
44
|
+
}
|
|
45
|
+
export interface EtatSaisieSummary {
|
|
46
|
+
top_5_customer_creditors: EtatSaisieTopCustomerItem[];
|
|
47
|
+
top_5_supplier_debtors: EtatSaisieTopSupplierItem[];
|
|
48
|
+
top_5_suspense: EtatSaisieTopSuspenseItem[];
|
|
49
|
+
companies_clean: number;
|
|
50
|
+
companies_in_error: number;
|
|
51
|
+
companies_scanned: number;
|
|
52
|
+
companies_with_anomalies: number;
|
|
53
|
+
}
|
|
54
|
+
export interface EtatSaisieSupplierRow {
|
|
55
|
+
devise: string;
|
|
56
|
+
dossier: string;
|
|
57
|
+
fournisseur: string;
|
|
58
|
+
nb_ecritures: number;
|
|
59
|
+
solde_debiteur_eur: number;
|
|
60
|
+
source: string;
|
|
61
|
+
}
|
|
62
|
+
export interface EtatSaisieSuspenseRow {
|
|
63
|
+
credit: number;
|
|
64
|
+
date: string;
|
|
65
|
+
debit: number;
|
|
66
|
+
devise: string;
|
|
67
|
+
dossier: string;
|
|
68
|
+
journal: string | null;
|
|
69
|
+
lettre: boolean;
|
|
70
|
+
libelle_compte: string | null;
|
|
71
|
+
libelle_ecriture: string | null;
|
|
72
|
+
numero_compte: string | null;
|
|
73
|
+
numero_piece: string | null;
|
|
74
|
+
solde_net: number;
|
|
75
|
+
source: string;
|
|
76
|
+
}
|
|
77
|
+
export interface EtatSaisieTopCustomerItem {
|
|
78
|
+
dossier: string;
|
|
79
|
+
nb_clients: number;
|
|
80
|
+
rank: number;
|
|
81
|
+
source: string;
|
|
82
|
+
top_montant: number | null;
|
|
83
|
+
top_nom: string | null;
|
|
84
|
+
total_eur: number;
|
|
85
|
+
}
|
|
86
|
+
export interface EtatSaisieTopSupplierItem {
|
|
87
|
+
dossier: string;
|
|
88
|
+
nb_fournisseurs: number;
|
|
89
|
+
rank: number;
|
|
90
|
+
source: string;
|
|
91
|
+
top_montant: number | null;
|
|
92
|
+
top_nom: string | null;
|
|
93
|
+
total_eur: number;
|
|
94
|
+
}
|
|
95
|
+
export interface EtatSaisieTopSuspenseItem {
|
|
96
|
+
dossier: string;
|
|
97
|
+
nb_ecritures: number;
|
|
98
|
+
rank: number;
|
|
99
|
+
solde_eur: number;
|
|
100
|
+
source: string;
|
|
101
|
+
top_libelle: string | null;
|
|
102
|
+
top_montant: number | null;
|
|
103
|
+
}
|
|
27
104
|
export interface FinanceJobsActionResponse {
|
|
28
105
|
message?: string;
|
|
29
106
|
ok: boolean;
|
|
@@ -111,6 +188,19 @@ export interface GetDashboardResponse {
|
|
|
111
188
|
pennylane: GetDashboardPennylaneResponse;
|
|
112
189
|
synchro: GetSynchroDashboardResponse;
|
|
113
190
|
}
|
|
191
|
+
export interface GetEtatSaisieLatestResponse {
|
|
192
|
+
as_of: string | null;
|
|
193
|
+
available: boolean;
|
|
194
|
+
computed_at: string | null;
|
|
195
|
+
customer_rows: EtatSaisieCustomerRow[];
|
|
196
|
+
no_data: EtatSaisieDossierLine[];
|
|
197
|
+
not_managed: EtatSaisieDossierLine[];
|
|
198
|
+
scan_duration_seconds: number | null;
|
|
199
|
+
status: string | null;
|
|
200
|
+
summary: EtatSaisieSummary | null;
|
|
201
|
+
supplier_rows: EtatSaisieSupplierRow[];
|
|
202
|
+
suspense_rows: EtatSaisieSuspenseRow[];
|
|
203
|
+
}
|
|
114
204
|
export interface GetExportsQuery {
|
|
115
205
|
balanceDateAfter?: string;
|
|
116
206
|
balanceDateBefore?: string;
|
|
@@ -318,6 +408,10 @@ export interface PostSmsWebhookParams {
|
|
|
318
408
|
export interface PutStopTaskV1Params {
|
|
319
409
|
id: number;
|
|
320
410
|
}
|
|
411
|
+
export interface RecomputeEtatSaisieResponse {
|
|
412
|
+
message: string;
|
|
413
|
+
ok: boolean;
|
|
414
|
+
}
|
|
321
415
|
export interface ResetOwnerStatsV1Params {
|
|
322
416
|
owner: string;
|
|
323
417
|
value: string;
|
|
@@ -436,6 +530,36 @@ export declare namespace Amex {
|
|
|
436
530
|
type ResponseBody = void;
|
|
437
531
|
}
|
|
438
532
|
}
|
|
533
|
+
export declare namespace EtatSaisie {
|
|
534
|
+
/**
|
|
535
|
+
* No description
|
|
536
|
+
* @tags EtatSaisie
|
|
537
|
+
* @name GetLatestV1
|
|
538
|
+
* @request GET:/v1/etat-saisie/latest
|
|
539
|
+
* @response `200` `GetEtatSaisieLatestResponse`
|
|
540
|
+
*/
|
|
541
|
+
namespace GetLatestV1 {
|
|
542
|
+
type RequestParams = {};
|
|
543
|
+
type RequestQuery = {};
|
|
544
|
+
type RequestBody = never;
|
|
545
|
+
type RequestHeaders = {};
|
|
546
|
+
type ResponseBody = GetEtatSaisieLatestResponse;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* No description
|
|
550
|
+
* @tags EtatSaisie
|
|
551
|
+
* @name RecomputeV1
|
|
552
|
+
* @request POST:/v1/etat-saisie/recompute
|
|
553
|
+
* @response `201` `RecomputeEtatSaisieResponse`
|
|
554
|
+
*/
|
|
555
|
+
namespace RecomputeV1 {
|
|
556
|
+
type RequestParams = {};
|
|
557
|
+
type RequestQuery = {};
|
|
558
|
+
type RequestBody = never;
|
|
559
|
+
type RequestHeaders = {};
|
|
560
|
+
type ResponseBody = RecomputeEtatSaisieResponse;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
439
563
|
export declare namespace FinanceJobs {
|
|
440
564
|
/**
|
|
441
565
|
* No description
|
|
@@ -991,6 +1115,26 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
991
1115
|
*/
|
|
992
1116
|
getTransactionsV1: (query: GetTransactionsV1Params, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
993
1117
|
};
|
|
1118
|
+
etatSaisie: {
|
|
1119
|
+
/**
|
|
1120
|
+
* No description
|
|
1121
|
+
*
|
|
1122
|
+
* @tags EtatSaisie
|
|
1123
|
+
* @name GetLatestV1
|
|
1124
|
+
* @request GET:/v1/etat-saisie/latest
|
|
1125
|
+
* @response `200` `GetEtatSaisieLatestResponse`
|
|
1126
|
+
*/
|
|
1127
|
+
getLatestV1: (params?: RequestParams) => Promise<HttpResponse<GetEtatSaisieLatestResponse, any>>;
|
|
1128
|
+
/**
|
|
1129
|
+
* No description
|
|
1130
|
+
*
|
|
1131
|
+
* @tags EtatSaisie
|
|
1132
|
+
* @name RecomputeV1
|
|
1133
|
+
* @request POST:/v1/etat-saisie/recompute
|
|
1134
|
+
* @response `201` `RecomputeEtatSaisieResponse`
|
|
1135
|
+
*/
|
|
1136
|
+
recomputeV1: (params?: RequestParams) => Promise<HttpResponse<RecomputeEtatSaisieResponse, any>>;
|
|
1137
|
+
};
|
|
994
1138
|
financeJobs: {
|
|
995
1139
|
/**
|
|
996
1140
|
* 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/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/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/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;
|
package/dist/mf/@mf-types.zip
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9777"],{5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},2086:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{p:()=>formatDate});const formatDate=ts=>new Date(ts).toLocaleString("fr-FR",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false})},884:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Dashboard});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var index_mjs_=__webpack_require__(207);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useDashboardQuery(){const api=(0,useApi.h)();const query=(0,modern_index_js_.useQuery)({queryKey:["tech","dashboard"],queryFn:async()=>await api.getDashboard().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var IconGithub=__webpack_require__(5068);var dist_index_js_=__webpack_require__(1380);var formatDate=__webpack_require__(2086);function App(){const dashboardResult=useDashboardQuery();const dashboard=dashboardResult.data;if(!dashboard)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Chargement..."})});return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:"lighter",fz:"sm",my:"md",span:true,c:"dimmed",children:["Derni\xe8re mise \xe0 jour :"," ",(0,formatDate.p)(dashboardResult?.dataUpdatedAt??Date.now())]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",ml:dashboard.amex.globalProblem?-30:0,children:[dashboard.amex.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:30,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Amex"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Purchase"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.amex.purchaseProblem?"red":"green",children:[dashboard.amex.purchaseTodayBalances," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"cash balances"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.purchasePendingTransactions,"/",dashboard.amex.purchaseTodayTransactions," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"transactions en attente"})]})]})})},"amex_purchase")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Merchant"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.amex.merchantProblem?"red":"green",children:[dashboard.amex.merchantPendingTransactions,"/",dashboard.amex.merchantTodayTransactions," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"transactions en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.merchantPendingChargebacks,"/",dashboard.amex.merchantTodayChargesbacks," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"remboursements en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.merchantPendingAdjustments,"/",dashboard.amex.merchantTodayAdjustments," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"ajustements en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{})]})]})})},"payfit_waiting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",ml:dashboard.gsheet.globalProblem?-30:0,children:[dashboard.gsheet.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:30,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Gsheet"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches non termin\xe9es"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.gsheet.pending>50?"red":dashboard.gsheet.pending>30?"orange":"green",children:[dashboard.gsheet.pending," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{span:true,c:"dimmed",children:["Le plus ancien date du :"," "]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:"bold",c:dashboard.gsheet.isPendingTooOld?"red":"green",children:dashboard.gsheet.oldest})]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches en cours"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.gsheet.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/gsheet_runner/actions",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"payfit_wainting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",children:["Notion",/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://www.notion.so/airporting/Bug-report-5686f21b8154456f8b82629fb36e0859",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:12},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{miw:800,verticalSpacing:"sm",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:"Membre"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Not started"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"In progress"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"To be reviewed"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:dashboard.notion.bugs?.map((bug,i)=>{const[assignee,avatar,notStarted,inProgress,toBeReviewed]=bug;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Avatar,{size:26,src:avatar,radius:26}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",fw:500,children:assignee})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+notStarted?"red":void 0,children:notStarted}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+inProgress?"orange":void 0,children:inProgress}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+toBeReviewed?"green":void 0,children:toBeReviewed})]},i)})})]})})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Payfit"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Exports du jour"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.payfit.today.sum," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"exports"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[dashboard.payfit.today.siretsCount," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"dimmed",children:"SIRETs concern\xe9s"})]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Exports en attente"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.payfit.pending.sum," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"exports"})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[dashboard.payfit.pending.siretsCount," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"dimmed",children:"SIRETs concern\xe9s"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/payfit-scraper/actions/workflows/scrap.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"payfit_wainting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Pennylane"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Cookie"})})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",mt:"md",children:["Dernier refresh \xe0"," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,span:true,c:dashboard.pennylane.isTooOld?"red":"green",children:dashboard.pennylane.lastTime})]})]},"payfit_wainting_load")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Synchro"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:"green",children:[dashboard.synchro.askedToday," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"aujourd'hui"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,c:"red",children:dashboard.synchro.errorsToday})," ","en erreur (~",((dashboard.synchro.errorsToday??0)*100/(dashboard.synchro.askedToday??1)).toFixed(2),"%)"]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Actuellement"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.synchro.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"en cours"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,children:dashboard.synchro.waiting})," ","en attente"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/jobs_recipes_runner/actions/workflows/run-recipe.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})]},"payfit_wainting_load")})]})]})}var providers=__webpack_require__(7034);function Dashboard(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)(App,{})})})}}}]);
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9777"],{5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},1999:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Dashboard});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var index_mjs_=__webpack_require__(207);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useDashboardQuery(){const api=(0,useApi.h)();const query=(0,modern_index_js_.useQuery)({queryKey:["tech","dashboard"],queryFn:async()=>await api.getDashboard().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var IconGithub=__webpack_require__(5068);var dist_index_js_=__webpack_require__(1380);const formatDate=ts=>new Date(ts).toLocaleString("fr-FR",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false});function App(){const dashboardResult=useDashboardQuery();const dashboard=dashboardResult.data;if(!dashboard)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Chargement..."})});return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:"lighter",fz:"sm",my:"md",span:true,c:"dimmed",children:["Derni\xe8re mise \xe0 jour :"," ",formatDate(dashboardResult?.dataUpdatedAt??Date.now())]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",ml:dashboard.amex.globalProblem?-30:0,children:[dashboard.amex.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:30,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Amex"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Purchase"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.amex.purchaseProblem?"red":"green",children:[dashboard.amex.purchaseTodayBalances," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"cash balances"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.purchasePendingTransactions,"/",dashboard.amex.purchaseTodayTransactions," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"transactions en attente"})]})]})})},"amex_purchase")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Merchant"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.amex.merchantProblem?"red":"green",children:[dashboard.amex.merchantPendingTransactions,"/",dashboard.amex.merchantTodayTransactions," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"transactions en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.merchantPendingChargebacks,"/",dashboard.amex.merchantTodayChargesbacks," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"remboursements en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{}),dashboard.amex.merchantPendingAdjustments,"/",dashboard.amex.merchantTodayAdjustments," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"ajustements en attente"}),/*#__PURE__*/(0,jsx_runtime.jsx)("br",{})]})]})})},"payfit_waiting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",ml:dashboard.gsheet.globalProblem?-30:0,children:[dashboard.gsheet.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:30,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Gsheet"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches non termin\xe9es"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.gsheet.pending>50?"red":dashboard.gsheet.pending>30?"orange":"green",children:[dashboard.gsheet.pending," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{span:true,c:"dimmed",children:["Le plus ancien date du :"," "]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:"bold",c:dashboard.gsheet.isPendingTooOld?"red":"green",children:dashboard.gsheet.oldest})]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches en cours"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.gsheet.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/gsheet_runner/actions",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"payfit_wainting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:2,my:"md",children:["Notion",/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://www.notion.so/airporting/Bug-report-5686f21b8154456f8b82629fb36e0859",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:12},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{miw:800,verticalSpacing:"sm",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:"Membre"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Not started"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"In progress"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"To be reviewed"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:dashboard.notion.bugs?.map((bug,i)=>{const[assignee,avatar,notStarted,inProgress,toBeReviewed]=bug;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Avatar,{size:26,src:avatar,radius:26}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",fw:500,children:assignee})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+notStarted?"red":void 0,children:notStarted}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+inProgress?"orange":void 0,children:inProgress}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{c:+toBeReviewed?"green":void 0,children:toBeReviewed})]},i)})})]})})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Payfit"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Exports du jour"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.payfit.today.sum," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"exports"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[dashboard.payfit.today.siretsCount," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"dimmed",children:"SIRETs concern\xe9s"})]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Exports en attente"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.payfit.pending.sum," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"exports"})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[dashboard.payfit.pending.siretsCount," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"dimmed",children:"SIRETs concern\xe9s"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/payfit-scraper/actions/workflows/scrap.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"payfit_wainting_load")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Pennylane"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Cookie"})})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",mt:"md",children:["Dernier refresh \xe0"," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,span:true,c:dashboard.pennylane.isTooOld?"red":"green",children:dashboard.pennylane.lastTime})]})]},"payfit_wainting_load")})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:2,my:"md",children:"Synchro"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:"green",children:[dashboard.synchro.askedToday," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"aujourd'hui"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,c:"red",children:dashboard.synchro.errorsToday})," ","en erreur (~",((dashboard.synchro.errorsToday??0)*100/(dashboard.synchro.askedToday??1)).toFixed(2),"%)"]})]},"payfit_wainting_load")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Actuellement"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.synchro.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"en cours"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,children:dashboard.synchro.waiting})," ","en attente"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/jobs_recipes_runner/actions/workflows/run-recipe.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})]},"payfit_wainting_load")})]})]})}var providers=__webpack_require__(7034);function Dashboard(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)(App,{})})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["7915"],{1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3106);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"subtle",color:"gray",onClick:onRefresh,disabled:!onRefresh,"aria-label":"Refresh",style:{width:"auto",paddingInline:8},children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative})}),actions]})]})}},7497:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>EtatSaisie});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 useEtatSaisieLatest(){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","etat-saisie","latest"],queryFn:async()=>(await api.etatSaisie.getLatestV1()).data,refetchOnWindowFocus:true})}function useEtatSaisieRecompute(){const api=(0,useApi.h)();const qc=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async()=>(await api.etatSaisie.recomputeV1()).data,onSuccess:()=>qc.invalidateQueries({queryKey:["tech","etat-saisie","latest"]})})}function DetailTable(props){const{columns,rows}=props;const[sortKey,setSortKey]=(0,index_js_.useState)(null);const[asc,setAsc]=(0,index_js_.useState)(false);const sorted=[...rows].sort((a,b)=>{if(!sortKey)return 0;const av=a[sortKey];const bv=b[sortKey];if("number"==typeof av&&"number"==typeof bv)return asc?av-bv:bv-av;return asc?String(av).localeCompare(String(bv)):String(bv).localeCompare(String(av))});const toggle=k=>{if(sortKey===k)setAsc(v=>!v);else{setSortKey(k);setAsc(false)}};const fmt=(v,numeric)=>{if(numeric&&"number"==typeof v)return v.toLocaleString("fr-FR",{minimumFractionDigits:2,maximumFractionDigits:2});if("boolean"==typeof v)return v?"✓":"";return null==v?"—":String(v)};return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{striped:true,highlightOnHover:true,withTableBorder:true,stickyHeader:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tr,{children:columns.map(c=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Th,{onClick:()=>toggle(c.key),style:{cursor:"pointer"},children:[c.label,sortKey===c.key?asc?" ▲":" ▼":""]},c.key))})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:0===sorted.length?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tr,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{colSpan:columns.length,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",ta:"center",children:"Aucune ligne"})})}):sorted.map((row,i)=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tr,{children:columns.map(c=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{style:c.numeric?{textAlign:"right",fontVariantNumeric:"tabular-nums"}:void 0,children:fmt(row[c.key],c.numeric)},c.key))},i))})]})}var PageHeader=__webpack_require__(1354);function EtatSaisieApp(){const latest=useEtatSaisieLatest();const recompute=useEtatSaisieRecompute();const[tab,setTab]=(0,index_js_.useState)("resume");const d=latest.data;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{fluid:true,my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"\xc9tat saisie",updatedAt:d?.computed_at?new Date(d.computed_at).getTime():latest.dataUpdatedAt,isFetching:latest.isFetching,isError:latest.isError,onRefresh:()=>latest.refetch(),actions:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{loading:recompute.isPending,onClick:()=>recompute.mutate(),variant:"light",children:"Recalculer"})}),d&&!d.available?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"Aucun snapshot disponible — lancez \xab Recalculer \xbb ou attendez le run nocturne."}):/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Tabs,{value:tab,onChange:setTab,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Tabs.List,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Tab,{value:"resume",children:"R\xe9sum\xe9"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Tab,{value:"s471",children:"D\xe9tail 471"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Tab,{value:"s401",children:"Fournisseurs d\xe9biteurs (401)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Tab,{value:"s411",children:"Clients cr\xe9diteurs (411)"})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Tabs.Panel,{value:"resume",pt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.SimpleGrid,{cols:4,mb:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"Scann\xe9s"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"xl",children:d?.summary?.companies_scanned??0})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"Propres"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"xl",c:"green",children:d?.summary?.companies_clean??0})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"En anomalie"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"xl",c:"orange",children:d?.summary?.companies_with_anomalies??0})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"En erreur"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"xl",c:"red",children:d?.summary?.companies_in_error??0})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,mt:"md",children:"Top 5 comptes d'attente (471)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:TOP_SUSPENSE_COLS,rows:d?.summary?.top_5_suspense??[]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,mt:"md",children:"Top 5 fournisseurs d\xe9biteurs (401)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:TOP_SUPPLIER_COLS,rows:d?.summary?.top_5_supplier_debtors??[]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,mt:"md",children:"Top 5 clients cr\xe9diteurs (411)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:TOP_CUSTOMER_COLS,rows:d?.summary?.top_5_customer_creditors??[]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,mt:"md",children:"Dossiers \xe0 relancer (no_data)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:DOSSIER_COLS,rows:d?.no_data??[]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,mt:"md",children:"Dossiers non manag\xe9s (hors agr\xe9gats)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:DOSSIER_COLS,rows:d?.not_managed??[]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Panel,{value:"s471",pt:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:SUSPENSE_COLS,rows:d?.suspense_rows??[]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Panel,{value:"s401",pt:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:SUPPLIER_COLS,rows:d?.supplier_rows??[]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tabs.Panel,{value:"s411",pt:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(DetailTable,{columns:CUSTOMER_COLS,rows:d?.customer_rows??[]})})]}),latest.isError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"red",mt:"md",children:"Erreur de chargement."}):null]})}const TOP_SUSPENSE_COLS=[{key:"rank",label:"#",numeric:true},{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"solde_eur",label:"Solde 471 (€)",numeric:true},{key:"nb_ecritures",label:"Nb \xe9cr.",numeric:true},{key:"top_libelle",label:"Top \xe9criture"},{key:"top_montant",label:"Montant",numeric:true}];const TOP_SUPPLIER_COLS=[{key:"rank",label:"#",numeric:true},{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"total_eur",label:"Total d\xe9biteur (€)",numeric:true},{key:"nb_fournisseurs",label:"Nb fourn.",numeric:true},{key:"top_nom",label:"Top fournisseur"},{key:"top_montant",label:"Montant",numeric:true}];const TOP_CUSTOMER_COLS=[{key:"rank",label:"#",numeric:true},{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"total_eur",label:"Total cr\xe9diteur (€)",numeric:true},{key:"nb_clients",label:"Nb clients",numeric:true},{key:"top_nom",label:"Top client"},{key:"top_montant",label:"Montant",numeric:true}];const DOSSIER_COLS=[{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"status",label:"Statut"},{key:"solde_attente_eur",label:"Solde attente (€)",numeric:true},{key:"total_fournisseurs_eur",label:"Total fourn. (€)",numeric:true},{key:"total_clients_eur",label:"Total clients (€)",numeric:true},{key:"last_entry_date",label:"Derni\xe8re \xe9criture"}];const SUSPENSE_COLS=[{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"date",label:"Date"},{key:"numero_compte",label:"N\xb0 Compte"},{key:"libelle_compte",label:"Libell\xe9 compte"},{key:"libelle_ecriture",label:"Libell\xe9 \xe9criture"},{key:"journal",label:"Journal"},{key:"numero_piece",label:"N\xb0 Pi\xe8ce"},{key:"debit",label:"D\xe9bit",numeric:true},{key:"credit",label:"Cr\xe9dit",numeric:true},{key:"solde_net",label:"Solde net",numeric:true},{key:"lettre",label:"Lettr\xe9"},{key:"devise",label:"Devise"}];const SUPPLIER_COLS=[{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"fournisseur",label:"Fournisseur"},{key:"solde_debiteur_eur",label:"Solde d\xe9biteur (€)",numeric:true},{key:"nb_ecritures",label:"Nb \xe9cr. non lettr\xe9es",numeric:true},{key:"devise",label:"Devise"}];const CUSTOMER_COLS=[{key:"source",label:"Source"},{key:"dossier",label:"Dossier"},{key:"client",label:"Client"},{key:"solde_crediteur_eur",label:"Solde cr\xe9diteur (€)",numeric:true},{key:"nb_ecritures",label:"Nb \xe9cr. non lettr\xe9es",numeric:true},{key:"devise",label:"Devise"}];function EtatSaisie(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)(EtatSaisieApp,{})})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["8692"],{5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["8692"],{1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3106);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"subtle",color:"gray",onClick:onRefresh,disabled:!onRefresh,"aria-label":"Refresh",style:{width:"auto",paddingInline:8},children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative})}),actions]})]})}},5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},9031:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Github});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var index_mjs_=__webpack_require__(207);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useGithubQuery(){const api=(0,useApi.h)();const query=(0,modern_index_js_.useQuery)({queryKey:["tech","github"],queryFn:async()=>await api.github.getJobsRunnersV1().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var IconGithub=__webpack_require__(5068);var dist_index_js_=__webpack_require__(1380);var PageHeader=__webpack_require__(1354);function GithubApp(){const dashboardResult=useGithubQuery();const dashboard=dashboardResult.data;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"Runners GitHub",updatedAt:dashboardResult.dataUpdatedAt,isFetching:dashboardResult.isFetching,isError:dashboardResult.isError,onRefresh:()=>dashboardResult.refetch()}),dashboard?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{miw:800,verticalSpacing:"sm",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:"Repository"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Tag"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Self-hosted"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Runners"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:dashboard.list.map((line,i)=>{const{repo,selfhost,runner_tag,runners}=line;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:`https://github.com/airporting/${repo}`,children:[repo,"\xa0",/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:runner_tag}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:selfhost?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCheck,{size:30,color:"green"}):/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:30,color:"red"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:runners.map((runnerItem,j)=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"blue",m:5,children:runnerItem},j))})]},i)})})]})}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{children:"Chargement…"})]})}var providers=__webpack_require__(7034);function Github(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)(GithubApp,{})})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["1744"],{316:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Sobank});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var providers=__webpack_require__(7034);var index_mjs_=__webpack_require__(207);var esm_index_mjs_=__webpack_require__(9038);var tabler_icons_react_mjs_=__webpack_require__(9632);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useSobankExports(params){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","sobank","exports",params],queryFn:async()=>await api.sobank.getExportsV1(params).then(x=>x.data),refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true})}var date_fns_index_js_=__webpack_require__(4365);function SobankApp(){const[dateRange,setDateRange]=(0,index_js_.useState)([null,null]);const[bank,setBank]=(0,index_js_.useState)("");const[currency,setCurrency]=(0,index_js_.useState)("");const[iban,setIban]=(0,index_js_.useState)("");const exportsResult=useSobankExports({...dateRange[0]&&{balanceDateAfter:new Date(dateRange[0]).toISOString()},...dateRange[1]&&{balanceDateBefore:new Date(dateRange[1]).toISOString()},...bank&&{bank},...currency&&{currency},...iban&&{iban}});const rows=exportsResult.data?.exports??[];return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["1744"],{1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3106);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"subtle",color:"gray",onClick:onRefresh,disabled:!onRefresh,"aria-label":"Refresh",style:{width:"auto",paddingInline:8},children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative})}),actions]})]})}},316:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Sobank});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(3106);var providers=__webpack_require__(7034);var index_mjs_=__webpack_require__(207);var esm_index_mjs_=__webpack_require__(9038);var tabler_icons_react_mjs_=__webpack_require__(9632);var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useSobankExports(params){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","sobank","exports",params],queryFn:async()=>await api.sobank.getExportsV1(params).then(x=>x.data),refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true})}var date_fns_index_js_=__webpack_require__(4365);var PageHeader=__webpack_require__(1354);function SobankApp(){const[dateRange,setDateRange]=(0,index_js_.useState)([null,null]);const[bank,setBank]=(0,index_js_.useState)("");const[currency,setCurrency]=(0,index_js_.useState)("");const[iban,setIban]=(0,index_js_.useState)("");const exportsResult=useSobankExports({...dateRange[0]&&{balanceDateAfter:new Date(dateRange[0]).toISOString()},...dateRange[1]&&{balanceDateBefore:new Date(dateRange[1]).toISOString()},...bank&&{bank},...currency&&{currency},...iban&&{iban}});const rows=exportsResult.data?.exports??[];return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Container,{my:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"Exports Sobank",updatedAt:exportsResult.dataUpdatedAt,isFetching:exportsResult.isFetching,isError:exportsResult.isError,onRefresh:()=>exportsResult.refetch()}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Stack,{gap:"sm",my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{align:"flex-end",wrap:"wrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(esm_index_mjs_.DatePickerInput,{leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconCalendar,{size:18}),type:"range",label:"P\xe9riode de solde",placeholder:"S\xe9lectionner une plage",value:dateRange,onChange:setDateRange,clearable:true,allowSingleDateInRange:true,w:260}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"Banque",placeholder:"Filtrer par banque",value:bank,onChange:e=>setBank(e.currentTarget.value),w:160}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"Devise",placeholder:"EUR, USD...",value:currency,onChange:e=>setCurrency(e.currentTarget.value),w:120}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"IBAN",placeholder:"Filtrer par IBAN",value:iban,onChange:e=>setIban(e.currentTarget.value),w:240})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{stickyHeader:true,striped:true,highlightOnHover:true,withTableBorder:true,withColumnBorders: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:"ID"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"IBAN"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Banque"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Compte"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Devise"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Solde"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Date solde"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Solde pr\xe9c\xe9dent"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Date pr\xe9c\xe9dente"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Cr\xe9\xe9 le"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:rows.map(row=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:row.id}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:row.iban??"—"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:row.bank}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:row.account}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:row.currency}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:String(row.balance)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:(0,date_fns_index_js_.format)(row.balance_date,"dd/MM/yyyy HH:mm")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:String(row.previous_balance)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:(0,date_fns_index_js_.format)(row.previous_date,"dd/MM/yyyy HH:mm")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:(0,date_fns_index_js_.format)(row.created,"dd/MM/yyyy HH:mm")})]},row.id))})]})]})}function Sobank(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)(SobankApp,{})})})}}}]);
|