Merge pull request #29 from web3privacy/dk/rating-boolean-conditions-fixes

Dk/rating boolean conditions fixes
This commit is contained in:
DanielKlein 2024-09-20 12:30:19 +02:00 committed by GitHub
commit 609e9ce500
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1271 additions and 361 deletions

View file

@ -38,7 +38,7 @@ defineProps<{
:color="project.tracebility?.kyc ? '#FF0000' : '#18FF2F'"
title="Know Your Customer (KYC)"
>
{{ project.tracebility?.kyc ? 'YES' : 'NO' }}
{{ project.tracebility?.kyc ? 'YES': 'NO' }}
</ProjectInfoItem>
<ProjectInfoItem
:check-undefined="project.privacy_policy"

View file

@ -228,22 +228,22 @@ export const useData = defineStore('data', () => {
let value
let positive
if (ref.condition.minLength) {
if (ref.condition.minLength !== undefined) {
value = (field as any[])?.length
if (value) {
isValid = value >= ref.condition.minLength
positive = `${value} ${ref.label.positive}${value > 1 ? 's' : ''}`
}
}
if (ref.condition.equals) {
if (ref.condition.equals !== undefined) {
value = field
if (value)
if (value !== undefined)
isValid = value === ref.condition.equals
}
if (ref.condition.exists) {
if (ref.condition.exists !== undefined) {
value = field
if (value)
if (value !== undefined)
isValid = !!value
}
rankPoints += isValid ? ref.points : 0

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ export interface Project {
ecosystem?: string[]
product_readiness?: string
security?: string
have_token?: boolean
have_token: boolean
token_link?: string
assets_used?: string[]
tokens?: {
@ -57,44 +57,44 @@ export interface Project {
[k: string]: unknown
}
blockchain_features?: {
p2p?: boolean
p2p: boolean
encryption?: string
network?: string
upgradability?: {
enabled?: boolean
enabled: boolean
type?: string
admin_keys?: string
[k: string]: unknown
}
[k: string]: unknown
opensource: boolean
viewing_key?: boolean
dissapearing_tx?: boolean
viewing_key: boolean
dissapearing_tx: boolean
frontend_anonymity?: string
identity_integration?: null
connected_tx?: boolean
revealed_recipient?: boolean
revealed_sender?: boolean
revealed_ammount?: boolean
connected_tx: boolean
revealed_recipient: boolean
revealed_sender: boolean
revealed_ammount: boolean
reversability_condition?: string
data_masking?: string
asset_custody_type?: string
}
licences?: string
privacy_policy?: {
defined?: boolean
privacy_policy: {
defined: boolean
link?: string
data_usage?: string
[k: string]: unknown
}
team?: Team
storage?: {
decentralized?: boolean
decentralized: boolean
[k: string]: unknown
}
tracebility?: {
tracked_data?: string
kyc?: boolean
kyc: boolean
sign_in_type_requirments?: string[]
[k: string]: unknown
}
@ -115,10 +115,10 @@ export interface Project {
default_privacy?: boolean
funding?: Fund[]
project_status?: {
live_status?: boolean
live_status: boolean
version?: string
testnet?: boolean
mainnet?: boolean
testnet: boolean
mainnet: boolean
[k: string]: unknown
}
logos?: {