Skip to content

Commit

Permalink
style: update header and form credential
Browse files Browse the repository at this point in the history
  • Loading branch information
newarifrh committed Aug 24, 2024
1 parent 95d88a0 commit b1101be
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
34 changes: 20 additions & 14 deletions src/components/service/FormCredentialService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,28 @@ const FormCredentialService = ({ credential }: FormCredentialServiceProps) => {
return (
<div className="flex flex-col gap-3">
{credential.username && (
<Space.Compact>
<Input value={credential.username} type={"password"} disabled />
<Button
onClick={() => handleCopy(credential.username)}
icon={<CopyOutlined />}
/>
</Space.Compact>
<>
<span className="text-sm">Nama Pengguna</span>
<Space.Compact>
<Input.Password value={credential.username} />
<Button
onClick={() => handleCopy(credential.username)}
icon={<CopyOutlined />}
/>
</Space.Compact>
</>
)}
{credential.password && (
<Space.Compact>
<Input value={credential.password} type={"password"} disabled />
<Button
onClick={() => handleCopy(credential.password)}
icon={<CopyOutlined />}
/>
</Space.Compact>
<>
<span className="text-sm">Kata Sandi</span>
<Space.Compact>
<Input.Password value={credential.password} />
<Button
onClick={() => handleCopy(credential.password)}
icon={<CopyOutlined />}
/>
</Space.Compact>
</>
)}
<span className="italic">
{credential.hasSso ? (
Expand Down
8 changes: 4 additions & 4 deletions src/components/team/TeamItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const TeamItem = ({ team, onItemUpdated, onItemDeleted }: TeamItemProps) => {
items: [
{
key: "add",
label: "Tambah",
label: "Ubah",
onClick: () => {
const memberIds = team.users.map((item) => item.user.id);

Expand All @@ -105,8 +105,8 @@ const TeamItem = ({ team, onItemUpdated, onItemDeleted }: TeamItemProps) => {
maskClosable: true,
closable: true,
okCancel: true,
title: `Hapus Layanan: ${team.name}`,
content: "Apakah Anda yakin ingin menghapus layanan ini?",
title: `Hapus Tim: ${team.name}`,
content: "Apakah Anda yakin ingin menghapus tim ini?",
cancelText: "Batal",
okText: "Hapus",
onOk: () => handleDeleteService(team.id),
Expand Down Expand Up @@ -144,7 +144,7 @@ const TeamItem = ({ team, onItemUpdated, onItemDeleted }: TeamItemProps) => {
</div>

<Modal
title={`Tambah Anggota ${team.name}`}
title={`Ubah Anggota ${team.name}`}
open={open}
onOk={form.submit}
maskClosable={false}
Expand Down
5 changes: 4 additions & 1 deletion src/layouts/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useAuth } from "@/hooks/useAuth";
import { useMediaQuery } from "@/hooks/useMediaQuery";
import { protectedRoutes } from "@/routes/ProtectedRoute";
import { createBreadcrumbItems } from "@/utils/Breadcrumb";
import { getInitials } from "@/utils/String";
import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons";
import { Avatar, Dropdown, Layout, MenuProps, Breadcrumb, Button } from "antd";
import { forwardRef } from "react";
Expand Down Expand Up @@ -63,7 +64,9 @@ const Header = forwardRef<HTMLDivElement, HeaderProps>(
<span className="text-md">{!isMobile ? user?.name : null}</span>

<Dropdown menu={{ items }}>
<Avatar src={"/serambi-logo.png"} />
<Avatar style={{ backgroundColor: "#f56a00" }}>
{user?.name ? getInitials(user.name) : "😸"}
</Avatar>
</Dropdown>
</Layout.Header>
<Breadcrumb className="p-3" items={breadcrumbItems} />
Expand Down

0 comments on commit b1101be

Please sign in to comment.