Comission is now hidden from everyone apart from admins
This commit is contained in:
@@ -57,7 +57,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
|||||||
|
|
||||||
const columnHelper = createColumnHelper<Payment>();
|
const columnHelper = createColumnHelper<Payment>();
|
||||||
|
|
||||||
const PaymentCreator = ({onClose, reload}: {onClose: () => void; reload: () => void}) => {
|
const PaymentCreator = ({onClose, reload, showComission = false}: {onClose: () => void; reload: () => void, showComission: boolean}) => {
|
||||||
const [corporate, setCorporate] = useState<CorporateUser>();
|
const [corporate, setCorporate] = useState<CorporateUser>();
|
||||||
const [price, setPrice] = useState<number>(0);
|
const [price, setPrice] = useState<number>(0);
|
||||||
const [currency, setCurrency] = useState<string>("EUR");
|
const [currency, setCurrency] = useState<string>("EUR");
|
||||||
@@ -173,7 +173,7 @@ const PaymentCreator = ({onClose, reload}: {onClose: () => void; reload: () => v
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{showComission && (
|
||||||
<div className="flex gap-4 w-full">
|
<div className="flex gap-4 w-full">
|
||||||
<div className="flex flex-col w-full gap-3">
|
<div className="flex flex-col w-full gap-3">
|
||||||
<label className="font-normal text-base text-mti-gray-dim">Commission *</label>
|
<label className="font-normal text-base text-mti-gray-dim">Commission *</label>
|
||||||
@@ -191,6 +191,7 @@ const PaymentCreator = ({onClose, reload}: {onClose: () => void; reload: () => v
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="flex gap-4">
|
<div className="flex gap-4">
|
||||||
<div className="flex flex-col w-full gap-3">
|
<div className="flex flex-col w-full gap-3">
|
||||||
@@ -420,7 +421,11 @@ export default function PaymentRecord() {
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal isOpen={isCreatingPayment} onClose={() => setIsCreatingPayment(false)}>
|
<Modal isOpen={isCreatingPayment} onClose={() => setIsCreatingPayment(false)}>
|
||||||
<PaymentCreator onClose={() => setIsCreatingPayment(false)} reload={reload} />
|
<PaymentCreator
|
||||||
|
onClose={() => setIsCreatingPayment(false)}
|
||||||
|
reload={reload}
|
||||||
|
showComission={user.type === "developer" || user.type === "admin"}
|
||||||
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<div className="w-full flex flex-end justify-between p-2">
|
<div className="w-full flex flex-end justify-between p-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user