Combine data-access and contact list facets with OR so each selected dimension grants visibility.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -105,27 +105,33 @@ export function resolveAllSectionAccess(input: {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ابعاد پرشدهٔ یک قانون با OR؛ خالی = null */
|
||||||
|
function unionFacets<T>(facets: T[]): T | { OR: T[] } | null {
|
||||||
|
if (!facets.length) return null;
|
||||||
|
return facets.length === 1 ? facets[0]! : { OR: facets };
|
||||||
|
}
|
||||||
|
|
||||||
export function buildContactRuleWhere(
|
export function buildContactRuleWhere(
|
||||||
rule: DataAccessRule,
|
rule: DataAccessRule,
|
||||||
ctx: { userId: string; teamPeerIds: string[] | null },
|
ctx: { userId: string; teamPeerIds: string[] | null },
|
||||||
): Prisma.PersonWhereInput | null {
|
): Prisma.PersonWhereInput | null {
|
||||||
const and: Prisma.PersonWhereInput[] = [];
|
const facets: Prisma.PersonWhereInput[] = [];
|
||||||
const ids = ownerIdList(rule, ctx);
|
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
if (!ids.length) return null;
|
const ids = ownerIdList(rule, ctx);
|
||||||
and.push(ids.length === 1 ? { ownerId: ids[0]! } : { ownerId: { in: ids } });
|
if (ids.length) {
|
||||||
|
facets.push(ids.length === 1 ? { ownerId: ids[0]! } : { ownerId: { in: ids } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// groupIds دیگر فیلتر دسترسی نیست؛ دید گروه فقط از مسئولگروه (personViaGroupAssignee)
|
// groupIds دیگر فیلتر دسترسی نیست؛ دید گروه فقط از مسئولگروه (personViaGroupAssignee)
|
||||||
if (rule.sources?.length) {
|
if (rule.sources?.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [{ importSource: { in: rule.sources } }, { sourceRef: { in: rule.sources } }],
|
OR: [{ importSource: { in: rule.sources } }, { sourceRef: { in: rule.sources } }],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (rule.moods?.length) {
|
if (rule.moods?.length) {
|
||||||
and.push({ mood: { in: rule.moods } });
|
facets.push({ mood: { in: rule.moods } });
|
||||||
}
|
}
|
||||||
if (!and.length) return null;
|
return unionFacets(facets);
|
||||||
return and.length === 1 ? and[0]! : { AND: and };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function orParts<T>(parts: T[]): T | { OR: T[] } | { id: string } {
|
function orParts<T>(parts: T[]): T | { OR: T[] } | { id: string } {
|
||||||
@@ -177,26 +183,26 @@ export function customersCompanyWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.CompanyWhereInput[] = [];
|
const parts: Prisma.CompanyWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.CompanyWhereInput[] = [];
|
// حال مشتری روی شرکت معنا ندارد؛ فقط مالک/منبع
|
||||||
|
if (rule.moods?.length && !rule.owners?.length && !rule.sources?.length) continue;
|
||||||
|
const facets: Prisma.CompanyWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push(ids.length === 1 ? { ownerId: ids[0]! } : { ownerId: { in: ids } });
|
facets.push(ids.length === 1 ? { ownerId: ids[0]! } : { ownerId: { in: ids } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// groupIds دیگر فیلتر دسترسی نیست؛ دید گروه فقط از مسئولگروه (companyViaGroupAssignee)
|
// groupIds دیگر فیلتر دسترسی نیست؛ دید گروه فقط از مسئولگروه (companyViaGroupAssignee)
|
||||||
if (rule.sources?.length) {
|
if (rule.sources?.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [{ importSource: { in: rule.sources } }, { sourceRef: { in: rule.sources } }],
|
OR: [{ importSource: { in: rule.sources } }, { sourceRef: { in: rule.sources } }],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (rule.moods?.length && !rule.owners?.length && !rule.sources?.length) {
|
const w = unionFacets(facets);
|
||||||
continue;
|
if (w) parts.push(w);
|
||||||
}
|
|
||||||
if (!and.length) continue;
|
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
|
||||||
}
|
}
|
||||||
parts.push(companyViaGroupAssignee(actor.userId));
|
parts.push(companyViaGroupAssignee(actor.userId));
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
@@ -210,27 +216,28 @@ export function leadsDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.LeadWhereInput[] = [];
|
const parts: Prisma.LeadWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.LeadWhereInput[] = [];
|
const facets: Prisma.LeadWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push(ids.length === 1 ? { assigneeId: ids[0]! } : { assigneeId: { in: ids } });
|
facets.push(ids.length === 1 ? { assigneeId: ids[0]! } : { assigneeId: { in: ids } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.stageIds?.length) {
|
if (rule.stageIds?.length) {
|
||||||
and.push({ stageId: { in: rule.stageIds } });
|
facets.push({ stageId: { in: rule.stageIds } });
|
||||||
}
|
}
|
||||||
if (rule.sources?.length) {
|
if (rule.sources?.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: rule.sources.map((s) => ({
|
OR: rule.sources.map((s) => ({
|
||||||
source: { equals: s, mode: 'insensitive' as const },
|
source: { equals: s, mode: 'insensitive' as const },
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
@@ -243,28 +250,29 @@ export function dealsDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.DealWhereInput[] = [];
|
const parts: Prisma.DealWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.DealWhereInput[] = [];
|
const facets: Prisma.DealWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [
|
OR: [
|
||||||
{ ownerId: { in: ids } },
|
{ ownerId: { in: ids } },
|
||||||
{ assignees: { some: { id: { in: ids } } } },
|
{ assignees: { some: { id: { in: ids } } } },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.pipelineIds?.length) {
|
if (rule.pipelineIds?.length) {
|
||||||
and.push({ pipelineId: { in: rule.pipelineIds } });
|
facets.push({ pipelineId: { in: rule.pipelineIds } });
|
||||||
}
|
}
|
||||||
if (rule.stageIds?.length) {
|
if (rule.stageIds?.length) {
|
||||||
and.push({ stageId: { in: rule.stageIds } });
|
facets.push({ stageId: { in: rule.stageIds } });
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
@@ -277,32 +285,33 @@ export function activitiesDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.ActivityWhereInput[] = [];
|
const parts: Prisma.ActivityWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.ActivityWhereInput[] = [];
|
const facets: Prisma.ActivityWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [
|
OR: [
|
||||||
{ assigneeId: { in: ids } },
|
{ assigneeId: { in: ids } },
|
||||||
{ assignees: { some: { id: { in: ids } } } },
|
{ assignees: { some: { id: { in: ids } } } },
|
||||||
{ participantIds: { hasSome: ids } },
|
{ participantIds: { hasSome: ids } },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.boardIds?.length) {
|
if (rule.boardIds?.length) {
|
||||||
and.push({ boardId: { in: rule.boardIds } });
|
facets.push({ boardId: { in: rule.boardIds } });
|
||||||
}
|
}
|
||||||
if (rule.stageIds?.length) {
|
if (rule.stageIds?.length) {
|
||||||
and.push({ stageId: { in: rule.stageIds } });
|
facets.push({ stageId: { in: rule.stageIds } });
|
||||||
}
|
}
|
||||||
if (rule.typeIds?.length) {
|
if (rule.typeIds?.length) {
|
||||||
and.push({ typeDefId: { in: rule.typeIds } });
|
facets.push({ typeDefId: { in: rule.typeIds } });
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
@@ -321,34 +330,35 @@ export function notesDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return personalGate;
|
if (!sectionHasDataAccessLimits(section)) return personalGate;
|
||||||
const parts: Prisma.NoteWhereInput[] = [];
|
const parts: Prisma.NoteWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.NoteWhereInput[] = [];
|
const facets: Prisma.NoteWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [
|
OR: [
|
||||||
{ authorId: { in: ids } },
|
{ authorId: { in: ids } },
|
||||||
{
|
{
|
||||||
deal: {
|
deal: {
|
||||||
OR: [
|
OR: [
|
||||||
{ ownerId: { in: ids } },
|
{ ownerId: { in: ids } },
|
||||||
{ assignees: { some: { id: { in: ids } } } },
|
{ assignees: { some: { id: { in: ids } } } },
|
||||||
],
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
{ person: { ownerId: { in: ids } } },
|
||||||
{ person: { ownerId: { in: ids } } },
|
{ company: { ownerId: { in: ids } } },
|
||||||
{ company: { ownerId: { in: ids } } },
|
],
|
||||||
],
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
if (rule.sources?.length) {
|
if (rule.sources?.length) {
|
||||||
and.push({ noteType: { in: rule.sources } });
|
facets.push({ noteType: { in: rule.sources } });
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
AND: [personalGate, orParts(parts)],
|
AND: [personalGate, orParts(parts)],
|
||||||
@@ -363,26 +373,27 @@ export function ticketsDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.TicketWhereInput[] = [];
|
const parts: Prisma.TicketWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.TicketWhereInput[] = [];
|
const facets: Prisma.TicketWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [{ assigneeId: { in: ids } }, { reporterId: { in: ids } }],
|
OR: [{ assigneeId: { in: ids } }, { reporterId: { in: ids } }],
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.sources?.length) {
|
if (rule.sources?.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
status: {
|
status: {
|
||||||
in: rule.sources as Array<'open' | 'in_progress' | 'waiting' | 'resolved' | 'closed'>,
|
in: rule.sources as Array<'open' | 'in_progress' | 'waiting' | 'resolved' | 'closed'>,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
@@ -395,28 +406,29 @@ export function projectsDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.ProjectCardWhereInput[] = [];
|
const parts: Prisma.ProjectCardWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.ProjectCardWhereInput[] = [];
|
const facets: Prisma.ProjectCardWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push({
|
facets.push({
|
||||||
OR: [
|
OR: [
|
||||||
{ ownerId: { in: ids } },
|
{ ownerId: { in: ids } },
|
||||||
{ assignees: { some: { id: { in: ids } } } },
|
{ assignees: { some: { id: { in: ids } } } },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.boardIds?.length) {
|
if (rule.boardIds?.length) {
|
||||||
and.push({ boardId: { in: rule.boardIds } });
|
facets.push({ boardId: { in: rule.boardIds } });
|
||||||
}
|
}
|
||||||
if (rule.stageIds?.length) {
|
if (rule.stageIds?.length) {
|
||||||
and.push({ stageId: { in: rule.stageIds } });
|
facets.push({ stageId: { in: rule.stageIds } });
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
@@ -429,20 +441,21 @@ export function routinesDeepWhere(
|
|||||||
if (!sectionHasDataAccessLimits(section)) return {};
|
if (!sectionHasDataAccessLimits(section)) return {};
|
||||||
const parts: Prisma.RoutineTaskWhereInput[] = [];
|
const parts: Prisma.RoutineTaskWhereInput[] = [];
|
||||||
for (const rule of section.rules ?? []) {
|
for (const rule of section.rules ?? []) {
|
||||||
const and: Prisma.RoutineTaskWhereInput[] = [];
|
const facets: Prisma.RoutineTaskWhereInput[] = [];
|
||||||
if (rule.owners?.length) {
|
if (rule.owners?.length) {
|
||||||
const ids = ownerIdList(rule, {
|
const ids = ownerIdList(rule, {
|
||||||
userId: actor.userId,
|
userId: actor.userId,
|
||||||
teamPeerIds: actor.teamPeerIds ?? null,
|
teamPeerIds: actor.teamPeerIds ?? null,
|
||||||
});
|
});
|
||||||
if (!ids.length) continue;
|
if (ids.length) {
|
||||||
and.push(ids.length === 1 ? { assigneeId: ids[0]! } : { assigneeId: { in: ids } });
|
facets.push(ids.length === 1 ? { assigneeId: ids[0]! } : { assigneeId: { in: ids } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rule.typeIds?.length) {
|
if (rule.typeIds?.length) {
|
||||||
and.push({ categoryId: { in: rule.typeIds } });
|
facets.push({ categoryId: { in: rule.typeIds } });
|
||||||
}
|
}
|
||||||
if (!and.length) continue;
|
const w = unionFacets(facets);
|
||||||
parts.push(and.length === 1 ? and[0]! : { AND: and });
|
if (w) parts.push(w);
|
||||||
}
|
}
|
||||||
return orParts(parts);
|
return orParts(parts);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,15 +219,25 @@ export class PeopleService implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
const disc = discFilter(opts?.disc);
|
const disc = discFilter(opts?.disc);
|
||||||
if (disc) and.push(disc);
|
if (disc) and.push(disc);
|
||||||
if (groupIds.length) and.push({ groupLinks: { some: { groupId: { in: groupIds } } } });
|
// گروه / منبع / حال: اتحاد (هر بُعد کافی است)؛ داخل هر بُعد چند مقدار با in = OR
|
||||||
|
const facets: Prisma.PersonWhereInput[] = [];
|
||||||
|
if (groupIds.length) {
|
||||||
|
facets.push({ groupLinks: { some: { groupId: { in: groupIds } } } });
|
||||||
|
}
|
||||||
|
if (moods.length) {
|
||||||
|
facets.push({ mood: { in: moods } });
|
||||||
|
}
|
||||||
|
if (sources.length) {
|
||||||
|
facets.push({ importSource: { in: sources } });
|
||||||
|
}
|
||||||
|
if (facets.length === 1) and.push(facets[0]!);
|
||||||
|
else if (facets.length > 1) and.push({ OR: facets });
|
||||||
return {
|
return {
|
||||||
AND: [
|
AND: [
|
||||||
{
|
{
|
||||||
organizationId: actor.organizationId,
|
organizationId: actor.organizationId,
|
||||||
...customersPersonWhere(actor),
|
...customersPersonWhere(actor),
|
||||||
},
|
},
|
||||||
...(moods.length ? [{ mood: { in: moods } }] : []),
|
|
||||||
...(sources.length ? [{ importSource: { in: sources } }] : []),
|
|
||||||
...and,
|
...and,
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ function apply() {
|
|||||||
<strong>{{ hasSort ? 'فیلتر و مرتبسازی' : 'فیلترها' }}</strong>
|
<strong>{{ hasSort ? 'فیلتر و مرتبسازی' : 'فیلترها' }}</strong>
|
||||||
<button type="button" class="link" :disabled="!draftCount" @click="clearAll">پاک کردن همه</button>
|
<button type="button" class="link" :disabled="!draftCount" @click="clearAll">پاک کردن همه</button>
|
||||||
</header>
|
</header>
|
||||||
|
<p v-if="isPeople" class="facet-hint">
|
||||||
|
گروه، منبع و وضعیت با هم جمع میشوند؛ هر کدام کافی است (بدون تکرار).
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<section v-if="hasSort" class="sec">
|
<section v-if="hasSort" class="sec">
|
||||||
@@ -264,6 +267,15 @@ function apply() {
|
|||||||
border-bottom: 1px solid var(--line);
|
border-bottom: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.facet-hint {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.35rem 0.9rem 0.55rem;
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
color: #64748b;
|
||||||
|
line-height: 1.45;
|
||||||
|
border-bottom: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
.panel-foot {
|
.panel-foot {
|
||||||
border-top: 1px solid var(--line);
|
border-top: 1px solid var(--line);
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|||||||
@@ -449,11 +449,11 @@ const filterSummary = computed(() => {
|
|||||||
|
|
||||||
<template v-if="mode === 'rules'">
|
<template v-if="mode === 'rules'">
|
||||||
<p class="hint">
|
<p class="hint">
|
||||||
فقط رکوردهایی دیده میشوند که با
|
فیلترهای پرشده با هم
|
||||||
<strong>همهٔ فیلترهای پرشده</strong>
|
<strong>جمع میشوند</strong>
|
||||||
جور باشند. در هر فهرست، چند انتخاب یعنی هر کدام کافی است. خالی یعنی بدون محدودیت.
|
؛ هر بُعد کافی است (بدون تکرار). در هر فهرست هم چند انتخاب یعنی اتحاد. خالی یعنی بدون محدودیت آن بُعد.
|
||||||
<template v-if="isCustomers">
|
<template v-if="isCustomers">
|
||||||
اعضای گروههایی که این کاربر مسئولشان است جداگانه به همین محدوده اضافه میشوند (بدون تکرار).
|
اعضای گروههایی که این کاربر مسئولشان است جداگانه به همین محدوده اضافه میشوند.
|
||||||
</template>
|
</template>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="hadMultipleRules" class="hint warn">
|
<p v-if="hadMultipleRules" class="hint warn">
|
||||||
|
|||||||
@@ -646,8 +646,8 @@ export const DATA_ACCESS_LEGACY_SCOPE: Record<DataAccessSection, DataScope | nul
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* یک قانون: فیلدهای پرشده با AND.
|
* یک قانون: فیلدهای پرشده با OR (هر بُعد کافی است).
|
||||||
* قوانین متعدد در SectionDataAccess با OR ترکیب میشوند.
|
* قوانین متعدد در SectionDataAccess هم با OR ترکیب میشوند.
|
||||||
* ابعاد بلااستفاده برای یک بخش نادیده گرفته میشوند.
|
* ابعاد بلااستفاده برای یک بخش نادیده گرفته میشوند.
|
||||||
*/
|
*/
|
||||||
export type DataAccessRule = {
|
export type DataAccessRule = {
|
||||||
|
|||||||
Reference in New Issue
Block a user