Browse Source

Merge branch 'develop' of https://github.com/nocodb/nocodb into develop

pull/1845/head
Wing-Kam Wong 3 years ago
parent
commit
04629da20b
  1. 8
      packages/nc-gui/components/ProjectTreeView.vue
  2. 1
      packages/nc-gui/components/project/spreadsheet/components/virtualCell.vue
  3. 23
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue
  4. 2
      packages/nc-gui/components/settings/settingsModal.vue
  5. 6
      packages/nc-gui/lang/da.json
  6. 6
      packages/nc-gui/lang/de.json
  7. 6
      packages/nc-gui/lang/en.json
  8. 8
      packages/nc-gui/lang/es.json
  9. 6
      packages/nc-gui/lang/fa.json
  10. 6
      packages/nc-gui/lang/fi.json
  11. 6
      packages/nc-gui/lang/fr.json
  12. 6
      packages/nc-gui/lang/hr.json
  13. 6
      packages/nc-gui/lang/id.json
  14. 6
      packages/nc-gui/lang/it_IT.json
  15. 6
      packages/nc-gui/lang/iw.json
  16. 6
      packages/nc-gui/lang/ja.json
  17. 6
      packages/nc-gui/lang/ko.json
  18. 6
      packages/nc-gui/lang/lv.json
  19. 6
      packages/nc-gui/lang/nl.json
  20. 6
      packages/nc-gui/lang/no.json
  21. 6
      packages/nc-gui/lang/pl.json
  22. 6
      packages/nc-gui/lang/pt.json
  23. 6
      packages/nc-gui/lang/pt_BR.json
  24. 6
      packages/nc-gui/lang/ru.json
  25. 6
      packages/nc-gui/lang/sl.json
  26. 6
      packages/nc-gui/lang/sv.json
  27. 6
      packages/nc-gui/lang/th.json
  28. 6
      packages/nc-gui/lang/tr.json
  29. 6
      packages/nc-gui/lang/uk.json
  30. 6
      packages/nc-gui/lang/vi.json
  31. 6
      packages/nc-gui/lang/zh_CN.json
  32. 6
      packages/nc-gui/lang/zh_HK.json
  33. 6
      packages/nc-gui/lang/zh_TW.json
  34. 1
      packages/nc-gui/pages/projects/index.vue
  35. 12
      packages/noco-docs/content/en/setup-and-usages/formulas.md
  36. 17
      packages/nocodb/src/lib/dataMapper/lib/sql/formulav2/formulaQueryBuilderv2.ts
  37. 23
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mssql.ts
  38. 16
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mysql.ts
  39. 29
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/pg.ts
  40. 25
      packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/sqlite.ts

8
packages/nc-gui/components/ProjectTreeView.vue

@ -558,7 +558,7 @@
<!-- Team & Auth -->
<v-list-item-title>
<span class="font-weight-regular caption">{{
$t("title.team&auth")
$t("title.teamAndAuth")
}}</span>
</v-list-item-title>
</v-list-item>
@ -690,7 +690,7 @@
<v-icon color="brown" small class="mr-1">
mdi-cog
</v-icon>
Team & Settings
{{ $t('title.teamAndSettings') }}
</div>
</template>
</settings-modal>
@ -705,7 +705,7 @@
<v-icon small class="mr-2">
mdi-api
</v-icon>
API Docs
{{ $t('title.apiDocs') }}
</div>
<v-divider />
<extras class="pl-1" />
@ -1089,7 +1089,7 @@ export default {
this.changeActiveTab(tabIndex);
} else {
let item = {
name: `${this.$t("title.team&auth")} `,
name: `${this.$t("title.teamAndAuth")} `,
key: `roles`,
};
item._nodes = { env: "_noco" };

1
packages/nc-gui/components/project/spreadsheet/components/virtualCell.vue

@ -85,6 +85,7 @@
v-else-if="formula"
:row="row"
:column="column"
:client="nodes.dbConnection.client"
/>
<rollup-cell
v-else-if="rollup"

23
packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue

@ -11,19 +11,27 @@
</v-tooltip>
<div v-else-if="urls" v-html="urls" />
<div v-else>
{{ row[column.title] }}
{{ result }}
</div>
</template>
<script>
import dayjs from 'dayjs'
export default {
name: 'FormulaCell',
props: { column: Object, row: Object },
props: { column: Object, row: Object, client: String },
computed: {
result() {
if (this.client === 'pg') {
return this.handleTZ(this.row[this.column.title])
}
return this.row[this.column.title]
},
urls() {
if (!this.row[this.column.title]) { return }
const rawText = this.row[this.column.title].toString()
const rawText = this.result.toString()
let found = false
const out = rawText.replace(/URI::\((.*?)\)/g, (_, url) => {
found = true
@ -36,6 +44,15 @@ export default {
return found && out
}
},
methods: {
// handle date returned from PostgreSQL
handleTZ(val) {
if (!val) { return }
return val.replace(/((?:-?(?:[1-9][0-9]*)?[0-9]{4})-(?:1[0-2]|0[1-9])-(?:3[01]|0[1-9]|[12][0-9])T(?:2[0-3]|[01][0-9]):(?:[0-5][0-9]):(?:[0-5][0-9])(?:\.[0-9]+)?(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9]))/g, (i, v) => {
return dayjs(v).format('YYYY-MM-DD HH:mm')
})
}
}
}
</script>

2
packages/nc-gui/components/settings/settingsModal.vue

@ -48,7 +48,7 @@
<!-- Team & Auth -->
<v-list-item-title>
<span :class="{'font-weight-medium': activePage === 'roles', 'font-weight-regular':activePage !=='roles'}">{{
$t('title.team&auth')
$t('title.teamAndAuth')
}}</span>
</v-list-item-title>
</v-list-item>

6
packages/nc-gui/lang/da.json

@ -151,7 +151,7 @@
"lockedView": "Låst udsigt",
"personalView": "Personlig visning",
"appStore": "App butik",
"team&auth": "Team & Auth.",
"teamAndAuth": "Team & Auth.",
"rolesUserMgmt": "Roller & Brugere Management",
"userMgmt": "Bruger Management",
"apiTokenMgmt": "API TOKENS MANAGEMENT",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Avancerede parametre",
"headCreateProject": "Opret projekt | Nocodb.",
"headLogin": "Log ind | Nocodb.",
"resetPassword": "Nulstil din adgangskode"
"resetPassword": "Nulstil din adgangskode",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Bemærk Via.",

6
packages/nc-gui/lang/de.json

@ -151,7 +151,7 @@
"lockedView": "Gesperrte Ansicht",
"personalView": "Persönliche Ansicht",
"appStore": "App-Store",
"team&auth": "Team & Auth",
"teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Rollen- & Benutzermanagement",
"userMgmt": "Benutzermanagement",
"apiTokenMgmt": "API-Tokens-Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Erweiterte Parameter",
"headCreateProject": "Projekt erstellen | NocoDB",
"headLogin": "Anmelden | NocoDB",
"resetPassword": "Passwort zurücksetzen"
"resetPassword": "Passwort zurücksetzen",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Benachrichtigen mit",

6
packages/nc-gui/lang/en.json

@ -151,7 +151,7 @@
"lockedView": "Locked View",
"personalView": "Personal View",
"appStore": "App Store",
"team&auth": "Team & Auth",
"teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roles & Users Management",
"userMgmt": "Users management",
"apiTokenMgmt": "API Tokens Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Advanced parameters",
"headCreateProject": "Create Project | NocoDB",
"headLogin": "Log In | NocoDB",
"resetPassword": "Reset your password"
"resetPassword": "Reset your password",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Notify Via",

8
packages/nc-gui/lang/es.json

@ -12,7 +12,7 @@
"add": "Agregar",
"edit": "Editar",
"remove": "Eliminar",
"save": "Salvar",
"save": "Guardar",
"cancel": "Cancelar",
"submit": "Enviar",
"create": "Crear",
@ -151,7 +151,7 @@
"lockedView": "Vista bloqueada",
"personalView": "Vista personal",
"appStore": "Tienda de aplicaciones",
"team&auth": "Equipo y autenticación",
"teamAndAuth": "Equipo y autenticación",
"rolesUserMgmt": "Roles y gestión de usuarios",
"userMgmt": "Administrar usuarios",
"apiTokenMgmt": "Administrar tokens del API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL y parámetros avanzados",
"headCreateProject": "Crear proyecto | NocoDB",
"headLogin": "Acceder | NocoDB",
"resetPassword": "Cambiar contraseña"
"resetPassword": "Cambiar contraseña",
"teamAndSettings": "Equipo y configuración",
"apiDocs": "Documentación de la API"
},
"labels": {
"notifyVia": "Notificar a través de",

6
packages/nc-gui/lang/fa.json

@ -151,7 +151,7 @@
"lockedView": "نمایش قفلشده",
"personalView": "نمایش شخصی",
"appStore": "اپلیکیشنها",
"team&auth": "تیم و نویسندگان",
"teamAndAuth": "تیم و نویسندگان",
"rolesUserMgmt": "مدیریت نقشها و کاربران",
"userMgmt": "مدیریت کاربران",
"apiTokenMgmt": "مدیریت توکنهای API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL و پارامترهای پیشرفته",
"headCreateProject": "ایجاد پروژه | NocoDB",
"headLogin": "ورود | NocoDB",
"resetPassword": "بازنشانی کلمه عبور شما"
"resetPassword": "بازنشانی کلمه عبور شما",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "اعلان از طریق",

6
packages/nc-gui/lang/fi.json

@ -151,7 +151,7 @@
"lockedView": "Lukittu näkymä",
"personalView": "Henkilökohtainen näkymä",
"appStore": "Sovelluskauppa",
"team&auth": "Team & Auth",
"teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roolit ja käyttäjien hallinta",
"userMgmt": "Käyttäjien hallinta",
"apiTokenMgmt": "API Tokensin hallinta",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Advanced Parameters",
"headCreateProject": "Luo projekti Nokodb",
"headLogin": "Kirjaudu sisään | Nokodb",
"resetPassword": "Nollaa salasana"
"resetPassword": "Nollaa salasana",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Ilmoittaa kautta",

6
packages/nc-gui/lang/fr.json

@ -151,7 +151,7 @@
"lockedView": "Vue verrouillée",
"personalView": "Vue personnelle",
"appStore": "Magasin d'applications",
"team&auth": "Équipe & Authentification",
"teamAndAuth": "Équipe & Authentification",
"rolesUserMgmt": "Rôles & Gestion utilisateurs",
"userMgmt": "Gestion des utilisateurs",
"apiTokenMgmt": "Gestion des jetons API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL et paramètres avancés",
"headCreateProject": "Créer un projet | Nocodb",
"headLogin": "Connexion | Nocodb",
"resetPassword": "Réinitialiser le mot de passe"
"resetPassword": "Réinitialiser le mot de passe",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Notifier via",

6
packages/nc-gui/lang/hr.json

@ -151,7 +151,7 @@
"lockedView": "Zaključan",
"personalView": "Osobni pogled",
"appStore": "Trgovina aplikacijama",
"team&auth": "Tima",
"teamAndAuth": "Tima",
"rolesUserMgmt": "Upravce i korisnici",
"userMgmt": "Upravljanje korisnicima",
"apiTokenMgmt": "Upravljanje API tokena",
@ -169,7 +169,9 @@
"advancedParameters": "SSL i napredni parametri",
"headCreateProject": "Stvoriti projekt | Nocodb",
"headLogin": "Prijavite se | Nocodb",
"resetPassword": "Vraćanje izvorne lozinke"
"resetPassword": "Vraćanje izvorne lozinke",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Obavijestiti putem",

6
packages/nc-gui/lang/id.json

@ -151,7 +151,7 @@
"lockedView": "Tampilan yang terkunci",
"personalView": "Tampilan pribadi",
"appStore": "Toko aplikasi",
"team&auth": "Tim & AUTH.",
"teamAndAuth": "Tim & AUTH.",
"rolesUserMgmt": "Manajemen Peran & Pengguna",
"userMgmt": "Manajemen Pengguna",
"apiTokenMgmt": "API Token Management.",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Parameter Lanjutan",
"headCreateProject": "Buat Proyek | Nocodb.",
"headLogin": "Masuk | Nocodb.",
"resetPassword": "Mereset password Anda"
"resetPassword": "Mereset password Anda",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Beri tahu VIA.",

6
packages/nc-gui/lang/it_IT.json

@ -151,7 +151,7 @@
"lockedView": "Vista chiusa",
"personalView": "Vista personale",
"appStore": "App Store",
"team&auth": "Team & Autorizzazioni",
"teamAndAuth": "Team & Autorizzazioni",
"rolesUserMgmt": "Gestione dei ruoli e degli utenti",
"userMgmt": "Gestione degli utenti",
"apiTokenMgmt": "Gestione dei token API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL e parametri avanzati",
"headCreateProject": "Crea progetto | NocoDB",
"headLogin": "Accedi | NocoDB",
"resetPassword": "Reimposta la tua password"
"resetPassword": "Reimposta la tua password",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Notifica via.",

6
packages/nc-gui/lang/iw.json

@ -151,7 +151,7 @@
"lockedView": "נוף נעול",
"personalView": "תצוגה אישית",
"appStore": "חנות אפליקציות",
"team&auth": "צוות & auth.",
"teamAndAuth": "צוות & auth.",
"rolesUserMgmt": "תפקידים & ניהול משתמשים",
"userMgmt": "ניהול משתמשים.",
"apiTokenMgmt": "ניהול אסינס API.",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & פרמטרים מתקדמים",
"headCreateProject": "יצירת פרויקט נוקודב",
"headLogin": "התחבר | נוקודב",
"resetPassword": "לאפס את הסיסמה שלך"
"resetPassword": "לאפס את הסיסמה שלך",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "להודיע דרך",

6
packages/nc-gui/lang/ja.json

@ -151,7 +151,7 @@
"lockedView": "ロックビュー",
"personalView": "パーソナルビュー",
"appStore": "アプリストア",
"team&auth": "チームと認可",
"teamAndAuth": "チームと認可",
"rolesUserMgmt": "ロールとユーザー管理",
"userMgmt": "ユーザー管理",
"apiTokenMgmt": "APIトークン管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL&高度なパラメータ",
"headCreateProject": "プロジェクトを作成 | NocoDB",
"headLogin": "ログイン | NocoDB",
"resetPassword": "パスワードをリセットする"
"resetPassword": "パスワードをリセットする",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "次で通知する",

6
packages/nc-gui/lang/ko.json

@ -151,7 +151,7 @@
"lockedView": "잠긴보기",
"personalView": "개인적인 견해",
"appStore": "앱 스토어",
"team&auth": "팀 및 인증",
"teamAndAuth": "팀 및 인증",
"rolesUserMgmt": "역할 및 사용자 관리",
"userMgmt": "사용자 관리",
"apiTokenMgmt": "API 토큰 관리",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 및 고급 매개 변수",
"headCreateProject": "프로젝트 만들기 | nocodb.",
"headLogin": "로그인 | NocoDB.",
"resetPassword": "비밀번호를 재설정"
"resetPassword": "비밀번호를 재설정",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "통지를 통지합니다",

6
packages/nc-gui/lang/lv.json

@ -151,7 +151,7 @@
"lockedView": "Bloķētais skats",
"personalView": "Personīgais skats",
"appStore": "Veikals",
"team&auth": "Komanda & Autentifikācija",
"teamAndAuth": "Komanda & Autentifikācija",
"rolesUserMgmt": "Lomas & Lietotāju pārvaldība",
"userMgmt": "Lietotāju pārvaldība",
"apiTokenMgmt": "API Atslēgu pārvaldība",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Paplašinātie parametri",
"headCreateProject": "Izveidot projektu | NocoDB",
"headLogin": "Pieslēgties | NocoDB",
"resetPassword": "Atjaunot paroli"
"resetPassword": "Atjaunot paroli",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Paziņot izmantojot",

6
packages/nc-gui/lang/nl.json

@ -151,7 +151,7 @@
"lockedView": "Vergrendelde weergave",
"personalView": "Persoonlijke weergave",
"appStore": "App Store",
"team&auth": "Team & Auth",
"teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Rollen & Gebruikersbeheer",
"userMgmt": "Gebruikersbeheer",
"apiTokenMgmt": "API Tokenbeheer",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Geavanceerde Parameters",
"headCreateProject": "Project maken | Nocodb",
"headLogin": "Log in | Nocodb",
"resetPassword": "Stel je wachtwoord opnieuw in"
"resetPassword": "Stel je wachtwoord opnieuw in",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Melding via",

6
packages/nc-gui/lang/no.json

@ -151,7 +151,7 @@
"lockedView": "Låst visning",
"personalView": "Personlig utsikt",
"appStore": "App Store",
"team&auth": "Team og Auth.",
"teamAndAuth": "Team og Auth.",
"rolesUserMgmt": "Roller og brukeradministrasjon",
"userMgmt": "Brukeradministrasjon",
"apiTokenMgmt": "Administrering av API-nøkler",
@ -169,7 +169,9 @@
"advancedParameters": "SSL og avanserte parametere",
"headCreateProject": "Opprett prosjektet | NocoDB",
"headLogin": "Logg inn | NocoDB.",
"resetPassword": "Tilbakestill passordet ditt"
"resetPassword": "Tilbakestill passordet ditt",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Varsle Via.",

6
packages/nc-gui/lang/pl.json

@ -151,7 +151,7 @@
"lockedView": "Zamknięty widok",
"personalView": "Widok osobisty",
"appStore": "Sklep z aplikacjami",
"team&auth": "Team & Auth.",
"teamAndAuth": "Team & Auth.",
"rolesUserMgmt": "Role i zarządzanie użytkownikami",
"userMgmt": "Zarządzanie użytkownikami",
"apiTokenMgmt": "Zarządzanie Tokeny API.",
@ -169,7 +169,9 @@
"advancedParameters": "Parametry SSL i zaawansowane",
"headCreateProject": "Utwórz projekt |. NOCODB.",
"headLogin": "Zaloguj się | NOCODB.",
"resetPassword": "Zresetuj swoje hasło"
"resetPassword": "Zresetuj swoje hasło",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Powiadomić VIA.",

6
packages/nc-gui/lang/pt.json

@ -151,7 +151,7 @@
"lockedView": "Vista travada",
"personalView": "Vista pessoal",
"appStore": "Loja de Aplicações",
"team&auth": "Equipa & Autenticação",
"teamAndAuth": "Equipa & Autenticação",
"rolesUserMgmt": "Papéis & Gestão de Utilizadores",
"userMgmt": "Gestão de Utilizadores",
"apiTokenMgmt": "Gestão de Tokens API Tokens",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & parâmetros avançados",
"headCreateProject": "Criar Projecto | Noco",
"headLogin": "Autentique-se | Noco",
"resetPassword": "Redefina a sua palavra-passe"
"resetPassword": "Redefina a sua palavra-passe",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Notificar via.",

6
packages/nc-gui/lang/pt_BR.json

@ -151,7 +151,7 @@
"lockedView": "Vista travada",
"personalView": "Vista pessoal",
"appStore": "Loja de Aplicações",
"team&auth": "Time & Autenticação",
"teamAndAuth": "Time & Autenticação",
"rolesUserMgmt": "Papéis & Gestão de Usuários",
"userMgmt": "Gestão de Usuários",
"apiTokenMgmt": "Gestão de Tokens API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & parâmetros avançados",
"headCreateProject": "Criar Projeto | NocoDB",
"headLogin": "Autentique-se | NocoDB",
"resetPassword": "Redefina a sua senha"
"resetPassword": "Redefina a sua senha",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Notificar via.",

6
packages/nc-gui/lang/ru.json

@ -151,7 +151,7 @@
"lockedView": "Заблокированное представление",
"personalView": "Персональное представление",
"appStore": "Магазин приложений",
"team&auth": "Пользватели и API",
"teamAndAuth": "Пользватели и API",
"rolesUserMgmt": "Роли и управление пользователями",
"userMgmt": "Управление пользователями",
"apiTokenMgmt": "Управление токенами API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL и расширенные параметры",
"headCreateProject": "Создать проект |. NOCODB",
"headLogin": "Войти |. NOCODB",
"resetPassword": "Сбросить пароль"
"resetPassword": "Сбросить пароль",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Уведомлять через",

6
packages/nc-gui/lang/sl.json

@ -151,7 +151,7 @@
"lockedView": "Zaklenjen pogled",
"personalView": "Osebni pogled",
"appStore": "Trgovina z aplikacijami",
"team&auth": "Ekipa in avtorizacija",
"teamAndAuth": "Ekipa in avtorizacija",
"rolesUserMgmt": "Upravljanje vlog in uporabnikov",
"userMgmt": "Upravljanje uporabnikov",
"apiTokenMgmt": "Upravljanje žetonov API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL in napredni parametri",
"headCreateProject": "Ustvari projekt | NocoDB.",
"headLogin": "Prijava | Nocodb.",
"resetPassword": "Ponastavi geslo"
"resetPassword": "Ponastavi geslo",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Obvestite VIO.",

6
packages/nc-gui/lang/sv.json

@ -151,7 +151,7 @@
"lockedView": "Låst vy",
"personalView": "Personlig utsikt",
"appStore": "Appbutik",
"team&auth": "Team & Auth",
"teamAndAuth": "Team & Auth",
"rolesUserMgmt": "Roller och användarhantering",
"userMgmt": "Användarhantering",
"apiTokenMgmt": "API Tokens Management",
@ -169,7 +169,9 @@
"advancedParameters": "SSL och avancerade parametrar",
"headCreateProject": "Skapa projekt | Nocodb",
"headLogin": "Logga in | Nocodb",
"resetPassword": "Återställ ditt lösenord"
"resetPassword": "Återställ ditt lösenord",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Meddela via",

6
packages/nc-gui/lang/th.json

@ -151,7 +151,7 @@
"lockedView": "มมมองลอค",
"personalView": "มมมองสวนบคคล",
"appStore": "แอพสโตร",
"team&auth": "ทม & Auth",
"teamAndAuth": "ทม & Auth",
"rolesUserMgmt": "บทบาทและผใชการจดการ",
"userMgmt": "การจดการผใช",
"apiTokenMgmt": "การจดการโทเคน API",
@ -169,7 +169,9 @@
"advancedParameters": "พารามเตอร SSL และขนสง",
"headCreateProject": "สรางโครงการ | nocodb",
"headLogin": "เขาสระบบ nocodb",
"resetPassword": "รเซตรหสผานของคณ"
"resetPassword": "รเซตรหสผานของคณ",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "แจงเตอนผาน",

6
packages/nc-gui/lang/tr.json

@ -151,7 +151,7 @@
"lockedView": "Kilitli görünüm",
"personalView": "Kişisel görünüm",
"appStore": "Uygulama mağazası",
"team&auth": "Takım ve Yetki",
"teamAndAuth": "Takım ve Yetki",
"rolesUserMgmt": "Roller ve Kullanıcıları Yönet",
"userMgmt": "Kullanıcıları Yönet",
"apiTokenMgmt": "API Tokenları Yönet",
@ -169,7 +169,9 @@
"advancedParameters": "SSL ve Gelişmiş Parametreler",
"headCreateProject": "Proje Oluştur | Nocodb",
"headLogin": "Giriş | Nocodb",
"resetPassword": "Şifrenizi sıfırlayın"
"resetPassword": "Şifrenizi sıfırlayın",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Aracılığıyla Bildir",

6
packages/nc-gui/lang/uk.json

@ -151,7 +151,7 @@
"lockedView": "Заблокований вигляд",
"personalView": "Особистий погляд",
"appStore": "App Store",
"team&auth": "Команда та автор",
"teamAndAuth": "Команда та автор",
"rolesUserMgmt": "Ролі та управління користувачами",
"userMgmt": "Управління користувачами",
"apiTokenMgmt": "Управління токенами API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL і розширені параметри",
"headCreateProject": "Створити проект | Нокодб",
"headLogin": "Вхід | Нокодб",
"resetPassword": "Скинути пароль"
"resetPassword": "Скинути пароль",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Повідомити через",

6
packages/nc-gui/lang/vi.json

@ -151,7 +151,7 @@
"lockedView": "LOCKED View.",
"personalView": "Quan điểm cá nhân",
"appStore": "Cửa hàng ứng dụng",
"team&auth": "Đội & auth.",
"teamAndAuth": "Đội & auth.",
"rolesUserMgmt": "Vai trò & Quản lý người dùng",
"userMgmt": "Quản lý người dùng",
"apiTokenMgmt": "Quản lý Token API",
@ -169,7 +169,9 @@
"advancedParameters": "SSL & Tham số nâng cao",
"headCreateProject": "Tạo dự án |. NOCODB.",
"headLogin": "Đăng nhập |. NOCODB.",
"resetPassword": "Đặt lại mật khẩu của bạn"
"resetPassword": "Đặt lại mật khẩu của bạn",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "Thông báo qua",

6
packages/nc-gui/lang/zh_CN.json

@ -151,7 +151,7 @@
"lockedView": "锁定视图",
"personalView": "个人观",
"appStore": "软件商店",
"team&auth": "团队和认证",
"teamAndAuth": "团队和认证",
"rolesUserMgmt": "角色和用户管理",
"userMgmt": "用户账号管理",
"apiTokenMgmt": "API 令牌管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 和高级参数",
"headCreateProject": "新建项目 | NocoDB",
"headLogin": "登录 | NocoDB",
"resetPassword": "重置密码"
"resetPassword": "重置密码",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "通知Via",

6
packages/nc-gui/lang/zh_HK.json

@ -151,7 +151,7 @@
"lockedView": "鎖定視圖",
"personalView": "個人觀",
"appStore": "應用商店",
"team&auth": "團隊&auth",
"teamAndAuth": "團隊&auth",
"rolesUserMgmt": "角色和用戶管理",
"userMgmt": "用戶管理",
"apiTokenMgmt": "API Tokens 管理",
@ -169,7 +169,9 @@
"advancedParameters": "安全證書及高級參數",
"headCreateProject": "開新Project | NocoDB",
"headLogin": "登入 | NocoDB",
"resetPassword": "reset你嗰密碼"
"resetPassword": "reset你嗰密碼",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "通知Via",

6
packages/nc-gui/lang/zh_TW.json

@ -151,7 +151,7 @@
"lockedView": "鎖定視圖",
"personalView": "個人觀",
"appStore": "應用程式商店",
"team&auth": "團隊和認證",
"teamAndAuth": "團隊和認證",
"rolesUserMgmt": "角色和使用者管理",
"userMgmt": "使用者管理",
"apiTokenMgmt": "API 權杖管理",
@ -169,7 +169,9 @@
"advancedParameters": "SSL 及進階參數",
"headCreateProject": "建立新專案|NocoDB",
"headLogin": "登入|NocoDB",
"resetPassword": "重設密碼"
"resetPassword": "重設密碼",
"teamAndSettings": "Team & Settings",
"apiDocs": "API Docs"
},
"labels": {
"notifyVia": "通知Via",

1
packages/nc-gui/pages/projects/index.vue

@ -163,6 +163,7 @@
:search="search"
:footer-props="{
'items-per-page-options': [20, -1],
'items-per-page-text': $t('msg.info.footerInfo')
}"
class="pa-4 text-left mx-auto"
style="cursor: pointer; max-width: 100%"

12
packages/noco-docs/content/en/setup-and-usages/formulas.md

@ -81,12 +81,12 @@ Example: (column1 + (column2 * column3) / (3 - column4 ))
### Date Functions
| Name | Syntax | Sample | Output |
|-------------|-----------------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| **DATEADD** | `DATEADD(DATE_COL, 1, 'day')` | `DATEADD(date, 1, 'day')` | Supposing the DATE_COL is 2022-03-14. The result is 2022-03-15. |
| | `DATEADD(DATE_TIME_COL, 2, 'month')` | `DATEADD(datetime, 2, 'month')` | Supposing the DATE_COL is 2022-03-14 03:14. The result is 2022-05-14 03:14. |
| | `IF(NOW() < DATE_COL, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than DATE_COL, it returns true. Otherwise, it returns false. |
| | `IF(NOW() < DATEADD(DATE_COL,10,'day'), "true", "false")` | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than DATE_COL plus 10 days, it returns true. Otherwise, it returns false. |
| Name | Syntax | Sample | Output | Remark |
|---|---|---|---|---|
| **DATEADD** | `DATEADD(DATE_COL, 1, 'day')` | `DATEADD(date, 1, 'day')` | Supposing the DATE_COL is 2022-03-14. The result is 2022-03-15. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'day')` |
| | `DATEADD(DATE_COL, 2, 'month')` | `DATEADD(date, 2, 'month')` | Supposing the DATE_COL is 2022-03-14 03:14. The result is 2022-05-14 03:14. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -2, 'month')` |
| | `IF(NOW() < DATE_COL, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than DATE_COL, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
| | `IF(NOW() < DATEADD(DATE_COL,10,'day'), "true", "false")` | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than DATE_COL plus 10 days, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
### Logical Operators

17
packages/nocodb/src/lib/dataMapper/lib/sql/formulav2/formulaQueryBuilderv2.ts

@ -564,15 +564,6 @@ export default async function formulaQueryBuilderv2(
}
}
break;
case 'DATEADD':
if (pt.arguments[1].value) {
pt.callee.name = 'DATE_ADD';
return fn(pt, alias, prevBinaryOp);
} else if (pt.arguments[1].operator == '-') {
pt.callee.name = 'DATE_SUB';
return fn(pt, alias, prevBinaryOp);
}
break;
case 'URL':
return fn(
{
@ -654,6 +645,14 @@ export default async function formulaQueryBuilderv2(
query.wrap('(', ')');
}
return query;
} else if (pt.type === 'UnaryExpression') {
const query = knex.raw(
`${pt.operator}${fn(pt.argument, null, pt.operator).toQuery()}${colAlias}`
);
if (prevBinaryOp && pt.operator !== prevBinaryOp) {
query.wrap('(', ')');
}
return query;
}
};
return { builder: fn(tree, alias) };

23
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mssql.ts

@ -89,31 +89,16 @@ const mssql = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`)
.wrap('(', ')');
},
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const dateIN = fn(pt.arguments[1]);
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
+${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd HH:mm')
${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd HH:mm')
ELSE
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
+${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd')
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
-${fn(pt.arguments[1])}.argument.value, ${fn(
pt.arguments[0]
)}), 'yyyy-MM-dd HH:mm')
ELSE
FORMAT(DATEADD(${String(fn(pt.arguments[2])).replace(/["']/g, '')},
-${fn(pt.arguments[1])}.argument.value, ${fn(
pt.arguments[0]
)}), 'yyyy-MM-dd')
${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])}, ${fn(pt.arguments[0])}), 'yyyy-MM-dd')
END${colAlias}`
);
}

16
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/mysql.ts

@ -37,7 +37,7 @@ const mysql2 = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as DOUBLE)${args.colAlias}`)
.wrap('(', ')');
},
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
@ -54,20 +54,6 @@ const mysql2 = {
)}))
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
DATE_FORMAT(DATE_ADD(${fn(pt.arguments[0])}, INTERVAL
${fn(pt.arguments[1])}.argument.value
${String(fn(pt.arguments[2])).replace(/["']/g, '')}), '%Y-%m-%d %H:%i')
ELSE
DATE(DATE_ADD(${fn(pt.arguments[0])}, INTERVAL
${fn(pt.arguments[1])}.argument.value
${String(fn(pt.arguments[2])).replace(/["']/g, '')}))
END${colAlias}`
);
}
};

29
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/pg.ts

@ -33,37 +33,18 @@ const pg = {
.raw(`CAST(${fn(pt.arguments[0])} as DOUBLE PRECISION)${colAlias}`)
.wrap('(', ')');
},
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN CAST(${fn(pt.arguments[0])} AS text) LIKE '%:%' THEN
to_char(${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${String(fn(pt.arguments[2])).replace(
/["']/g,
''
)}', 'YYYY-MM-DD HH24:MI')
)}'
ELSE
to_char(${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${String(fn(pt.arguments[2])).replace(/["']/g, '')}', 'YYYY-MM-DD')
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN CAST(${fn(pt.arguments[0])} AS text) LIKE '%:%' THEN
to_char(${fn(pt.arguments[0])} - INTERVAL '${
fn(pt.arguments[1]).argument.value
}
${String(fn(pt.arguments[2])).replace(
/["']/g,
''
)}', 'YYYY-MM-DD HH24:MI')
ELSE
to_char(${fn(pt.arguments[0])} - INTERVAL '${
fn(pt.arguments[1]).argument.value
}
${String(fn(pt.arguments[2])).replace(/["']/g, '')}', 'YYYY-MM-DD')
${fn(pt.arguments[0])} + INTERVAL '${fn(pt.arguments[1])}
${String(fn(pt.arguments[2])).replace(/["']/g, '')}'
END${colAlias}`
);
}

25
packages/nocodb/src/lib/dataMapper/lib/sql/functionMappings/sqlite.ts

@ -56,43 +56,26 @@ const sqlite3 = {
.raw(`CAST(${args.fn(args.pt.arguments[0])} as FLOAT)${args.colAlias}`)
.wrap('(', ')');
},
DATE_ADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
DATEADD: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
const dateIN = fn(pt.arguments[1]);
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn(
pt.arguments[0]
)}, 'localtime'),
'+${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
'${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
/["']/g,
''
)}'))
ELSE
DATE(DATETIME(${fn(pt.arguments[0])}, 'localtime'),
'+${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
'${dateIN > 0 ? '+' : ''}${fn(pt.arguments[1])} ${String(fn(pt.arguments[2])).replace(
/["']/g,
''
)}')
END${colAlias}`
);
},
DATE_SUB: ({ fn, knex, pt, colAlias }: MapFnArgs) => {
return knex.raw(
`CASE
WHEN ${fn(pt.arguments[0])} LIKE '%:%' THEN
STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn(
pt.arguments[0]
)}, 'localtime'),
'-${fn(pt.arguments[1]).argument.value} ${String(
fn(pt.arguments[2])
).replace(/["']/g, '')}'))
ELSE
DATE(DATETIME(${fn(pt.arguments[0])}, 'localtime'),
'-${fn(pt.arguments[1]).argument.value} ${String(
fn(pt.arguments[2])
).replace(/["']/g, '')}')
END${colAlias}`
);
}
};

Loading…
Cancel
Save