• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EcrituresNumeriques / stylo / 13987938500

21 Mar 2025 08:48AM UTC coverage: 31.659% (+0.6%) from 31.087%
13987938500

push

github

web-flow
chore: remplace les modales Geist (#1358)

Remplace aussi <Loading> par notre composant.

464 of 686 branches covered (67.64%)

Branch coverage included in aggregate %.

42 of 569 new or added lines in 36 files covered. (7.38%)

27 existing lines in 18 files now uncovered.

4396 of 14665 relevant lines covered (29.98%)

2.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/front/src/components/workspace/WorkspaceManageMembers.jsx
NEW
1
import { useToasts } from '@geist-ui/core'
×
2
import React, { useCallback } from 'react'
×
3
import { useWorkspaceMembersActions } from '../../hooks/workspace.js'
×
4
import ContactSearch from '../ContactSearch.jsx'
×
NEW
5
import Loading from '../molecules/Loading.jsx'
×
6

7
export default function WorkspaceManageMembers({ workspace }) {
×
8
  const workspaceId = workspace._id
×
9
  const { setToast } = useToasts()
×
10
  const { members, error, isLoading, inviteMember, removeMember } =
×
11
    useWorkspaceMembersActions(workspaceId)
×
12

13
  const handleUserUpdated = useCallback(
×
14
    async ({ user, action }) => {
×
15
      if (action === 'select') {
×
16
        try {
×
17
          await inviteMember(user)
×
18
          setToast({
×
19
            text: `Utilisateur ${
×
20
              user.displayName || user.username
×
21
            } invité en tant que membre.`,
×
22
            type: 'default',
×
23
          })
×
24
        } catch (err) {
×
25
          setToast({
×
26
            text: String(err),
×
27
            type: 'error',
×
28
          })
×
29
        }
×
30
      } else if (action === 'unselect') {
×
31
        try {
×
32
          await removeMember(user)
×
33
          setToast({
×
34
            text: `Utilisateur ${
×
35
              user.displayName || user.username
×
36
            } supprimé des membres.`,
×
37
            type: 'warning',
×
38
          })
×
39
        } catch (err) {
×
40
          setToast({
×
41
            text: String(err),
×
42
            type: 'error',
×
43
          })
×
44
        }
×
45
      }
×
46
    },
×
47
    [workspaceId]
×
48
  )
×
49

50
  if (error) {
×
51
    return <div>Unable to load workspace members</div>
×
52
  }
×
53

54
  if (isLoading) {
×
55
    return <Loading />
×
56
  }
×
57

58
  return (
×
59
    <section>
×
60
      <ContactSearch
×
61
        onUserUpdated={handleUserUpdated}
×
62
        members={members}
×
63
        showActiveUser
×
64
      />
×
65
    </section>
×
66
  )
67
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc