-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mvj 249 flow to typescript conversion #485
Merged
robertrytovuori
merged 39 commits into
develop
from
MVJ-249_flow-to-typescript-conversion
May 30, 2024
Merged
Changes from 38 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7d564f1
initial to typescript conversion
robertrytovuori 657a954
typescript errors fixing progress
robertrytovuori 50f60a0
sap invoice typescript fixes
robertrytovuori 0cb0515
root and rentbasis typescript error fixes
robertrytovuori aafda7a
rentbasis typescript error fixes
robertrytovuori 43f7970
typescript fixes relatedLEase and rentForPeriod
robertrytovuori 4c02a32
add ts-loader to prod webpack
robertrytovuori 01a8d0d
more typescript fixes
robertrytovuori aab461b
enable json loading in tsconfig
robertrytovuori 6b4d058
plotsearch typescript errors fix
robertrytovuori 3aa08f5
plotApplication typescript compile error fixes
robertrytovuori 8279f27
penaltyInterest typescript compile error fixes
robertrytovuori 0104af2
lease typescript fixes
robertrytovuori 8a782e1
leaseholdTransfer typescript fixes
robertrytovuori 708b18b
leasetype and leasestatisticreport typescript fixes
robertrytovuori 92cb641
landUseInvoices and other typescript error fixes
robertrytovuori 9cc421e
invoices and landUseAgreementAttachment typescript error fixes
robertrytovuori e4b0634
invoiceNote and invoiceSets typescript error fixes
robertrytovuori 0274a3e
infillDevelopment typescript fixes
robertrytovuori 2ab9786
index and foundation typescript error fixes
robertrytovuori 3f2b15e
district and creditDecision typescript fixes
robertrytovuori 7128663
createCollectionLetter and contractFile typescript fixes
robertrytovuori 80003bd
contacts typescript fixes
robertrytovuori ce5e826
components typescript fixes
robertrytovuori e8e39c9
comments and collection typescript fixes
robertrytovuori 5405059
batchrun and billingPeriod typescript fixes
robertrytovuori bfde8c7
auth and batchrun typescript fixes
robertrytovuori 492e145
auditlog typescript fixes
robertrytovuori 784242c
areaSearch typescript error fixes
robertrytovuori 466eb80
areaNote and application typescript error fixes
robertrytovuori 1b061e6
api and app typescript error fixes
robertrytovuori b2167a5
revert flowRight to decorated changes
robertrytovuori 1a73b07
webpack fixes for path resolution
robertrytovuori 3acd408
test run with typescript fixes
robertrytovuori e448eac
fix components test file
robertrytovuori 43d65ec
merge develop
robertrytovuori aed1b07
test:coverage with typescript fixes
robertrytovuori 7caf327
fixes to make baseUrl as src and more
robertrytovuori 334ff8b
move ts-loader and file-loader to dev dependencies
robertrytovuori File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* eslint-disable */ | ||
import flowRight from "lodash/flowRight"; | ||
import React from "react"; | ||
import { Button } from "react-foundation"; | ||
import { reveal } from "../foundation/reveal"; | ||
import { Sizes } from "../foundation/enums"; | ||
|
||
const ApiErrorModal = ({ | ||
data, | ||
handleDismiss, | ||
isOpen | ||
}) => <div className="api-error-modal"> | ||
{data ? <ApiErrorContent data={data} /> : null} | ||
<Button className="api-error-modal__close" disabled={!isOpen} size={Sizes.LARGE} onClick={handleDismiss}>Dismiss</Button> | ||
</div>; | ||
|
||
const ApiErrorList = ({ | ||
errors | ||
}) => { | ||
const listObjectErrors = (obj: Record<string, any>) => { | ||
return <ul> | ||
{Object.keys(obj).map(function (key, index) { | ||
if (typeof obj[key] === 'object') { | ||
return <li key={index}>{key}{listObjectErrors(obj[key])}</li>; | ||
} | ||
|
||
return <li key={index}>{key}: {obj[key]}</li>; | ||
})} | ||
</ul>; | ||
}; | ||
|
||
return <div className='api-error-modal__error-list'> | ||
<h5 className="api-error-modal__error-list-heading">Error list</h5> | ||
{listObjectErrors(errors)} | ||
</div>; | ||
}; | ||
|
||
const ApiErrorStackTrace = ({ | ||
trace | ||
}) => <div className="api-error-modal__trace"> | ||
<h5 className="api-error-modal__trace-heading">Trace</h5> | ||
<ol className="api-error-modal__trace-nav"> | ||
{trace.filter(item => item.file).map((item, index) => <li className="api-error-modal__trace-item" key={index}> | ||
<span className="api-error-modal__trace-source"> | ||
{item.file}({item.line}) | ||
</span> | ||
| ||
<span className="api-error-modal__trace-function"> | ||
{item.class ? `${item.class}::${item.function}` : item.function} | ||
</span> | ||
</li>)} | ||
</ol> | ||
</div>; | ||
|
||
const ApiErrorContent = ({ | ||
data | ||
}) => { | ||
return <div className="api-error-modal__content"> | ||
<h2 className="api-error-modal__title">Server error <small>{data.exception}</small></h2> | ||
<div className="api-error-modal__message">{data.message}</div> | ||
<div className="api-error-modal__source">{data.source}</div> | ||
{data.errors ? <ApiErrorList errors={data.errors} /> : null} | ||
{data.trace ? <ApiErrorStackTrace trace={data.trace} /> : null} | ||
</div>; | ||
}; | ||
|
||
export default flowRight(reveal({ | ||
name: 'apiError' | ||
}))(ApiErrorModal); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds a bit like
file-loader
,ts-loader
, andutility-types
should be devDependencies