mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Two of the features other kanban apps call AI, done with plain code
(docs/Features/General/Assistants/Assistants.md):
- A due date typed at the end of a new card's title ("... tomorrow 14:00",
"huomenna klo 14", "friday 9:30", "in 3 days", "23.10.") becomes the card's
due date, read with the browser's own Intl tables so every language works.
A hint under the field shows the date, and its x keeps the words. The
opened card's title reads it too, but only when the title changed.
- Similar cards: letter triples and the Dice coefficient (letter pairs for
scripts without spaces). The add-card form lists up to three close cards,
marking a possible duplicate, and the opened card has a Similar cards
section. The server method applies the board's read rules and the
assigned-only role.
Both are rows of Board Settings / Card and of Admin Panel / Settings /
Visibility / Features / Card fields, so a board admin or a site admin can
hide them. Translated in every language.
Thanks to xet7 !
13 lines
634 B
JavaScript
13 lines
634 B
JavaScript
import { Session } from 'meteor/session';
|
|
import { ReactiveCache } from '/imports/reactiveCache';
|
|
|
|
// A Board Settings / Card flag that is on unless the board set it false, read
|
|
// through the client's board read - so a field the administrator unticked in
|
|
// Admin Panel / Settings / Visibility / Features / Card fields reads as off too
|
|
// (models/lib/cardFieldVisibility.js). The helpers that need no AI use it:
|
|
// docs/Features/General/Assistants/Assistants.md
|
|
export function boardFlagOn(field, boardId = Session.get('currentBoard')) {
|
|
const board = ReactiveCache.getBoard(boardId);
|
|
return !!board && board[field] !== false;
|
|
}
|