Compare commits

...

6 Commits

Author SHA1 Message Date
Rama Priyanto 35f33fc5e5 feat:drone 2026-02-25 21:40:03 +07:00
hanif salafi afec24a759 feat: update delete axiosDise 2024-11-04 08:29:51 +07:00
hanif salafi ab0f6282f0 feat: update error icon 2024-11-04 08:19:20 +07:00
hanif salafi eb52be9138 feat: update package zod 2024-11-04 08:10:32 +07:00
hanif salafi f0622be664 feat: update gitlab ci 2024-11-04 08:00:48 +07:00
hanif salafi e520e64fcd feat: update sidebar and article table 2024-11-04 07:55:24 +07:00
8 changed files with 120 additions and 147 deletions

34
.drone.yml Normal file
View File

@ -0,0 +1,34 @@
kind: pipeline
type: ssh
name: humas-fe-build
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: prepare repo
when:
branch:
- prod
commands:
- rm -rf /opt/build/web-humas-fe
- mkdir -p /opt/build/web-humas-fe
- cd /opt/build
- git clone http://38.47.180.165:3000/humas/web-humas-fe.git
- cd /opt/build/web-humas-fe
- git checkout $DRONE_BRANCH
- name: build image
when:
branch:
- prod
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/web-humas-fe
- docker build -t 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH

View File

@ -9,12 +9,13 @@ build-dev:
- main - main
image: docker:stable image: docker:stable
services: services:
- docker:dind - name: docker:dind
command: ["--insecure-registry=103.82.242.92:8900"]
script: script:
- docker logout - docker logout
- docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN registry.gitlab.com - docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 103.82.242.92:8900
- docker build -t registry.gitlab.com/hanifsalafi/web-humas-polri:dev . - docker build -t 103.82.242.92:8900/humas/web-humas-fe:dev .
- docker push registry.gitlab.com/hanifsalafi/web-humas-polri:dev - docker push 103.82.242.92:8900/humas/web-humas-fe:dev
auto-deploy: auto-deploy:
stage: deploy stage: deploy

View File

@ -1504,3 +1504,17 @@ export const GoogleIcon = ({
</path> </path>
</svg> </svg>
); );
export const TimesIcon = ({
size,
height = 24,
width = 24,
fill = "currentColor",
...props
}: IconSvgProps) => (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" className="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
);

View File

@ -92,20 +92,20 @@ const sideBarDummyData = [
statusName: "Active", statusName: "Active",
childModule: null, childModule: null,
}, },
{ // {
id: 4, // id: 4,
name: "E-Magazine", // name: "E-Magazine",
moduleId: 652, // moduleId: 652,
moduleName: "Dashboard", // moduleName: "Dashboard",
modulePathUrl: "/admin/e-magazine", // modulePathUrl: "/admin/e-magazine",
parentId: -1, // parentId: -1,
icon: <TableIcon />, // icon: <TableIcon />,
position: 1, // position: 1,
statusId: 1, // statusId: 1,
childMenu: [], // childMenu: [],
statusName: "Active", // statusName: "Active",
childModule: null, // childModule: null,
}, // },
{ {
id: 5, id: 5,
name: "Master", name: "Master",
@ -121,34 +121,34 @@ const sideBarDummyData = [
statusName: "Active", statusName: "Active",
childModule: null, childModule: null,
}, },
{ // {
id: 6, // id: 6,
name: "Master Menu", // name: "Master Menu",
moduleId: 652, // moduleId: 652,
moduleName: "Form Custom", // moduleName: "Form Custom",
modulePathUrl: "/admin/master-menu", // modulePathUrl: "/admin/master-menu",
parentId: -1, // parentId: -1,
icon: <FormCustomIcon />, // icon: <FormCustomIcon />,
position: 1, // position: 1,
statusId: 1, // statusId: 1,
childMenu: [], // childMenu: [],
statusName: "Active", // statusName: "Active",
childModule: null, // childModule: null,
}, // },
{ // {
id: 7, // id: 7,
name: "Master Module", // name: "Master Module",
moduleId: 653, // moduleId: 653,
moduleName: "Form Horizontal", // moduleName: "Form Horizontal",
modulePathUrl: "/admin/master-module", // modulePathUrl: "/admin/master-module",
parentId: -1, // parentId: -1,
icon: <FormHorizontalIcon />, // icon: <FormHorizontalIcon />,
position: 1, // position: 1,
statusId: 1, // statusId: 1,
childMenu: [], // childMenu: [],
statusName: "Active", // statusName: "Active",
childModule: null, // childModule: null,
}, // },
{ {
id: 8, id: 8,
name: "Master User", name: "Master User",
@ -163,20 +163,20 @@ const sideBarDummyData = [
statusName: "Active", statusName: "Active",
childModule: null, childModule: null,
}, },
{ // {
id: 9, // id: 9,
name: "Master User Level", // name: "Master User Level",
moduleId: 655, // moduleId: 655,
moduleName: "Form User Level", // moduleName: "Form User Level",
modulePathUrl: "/admin/master-user-level", // modulePathUrl: "/admin/master-user-level",
parentId: -1, // parentId: -1,
icon: <FormLayoutIcon />, // icon: <FormLayoutIcon />,
position: 1, // position: 1,
statusId: 1, // statusId: 1,
childMenu: [], // childMenu: [],
statusName: "Active", // statusName: "Active",
childModule: null, // childModule: null,
}, // },
{ {
id: 10, id: 10,
name: "Master User Role", name: "Master User Role",

View File

@ -64,10 +64,10 @@ export default function ArticleTable() {
{ name: "No", uid: "no" }, { name: "No", uid: "no" },
{ name: "Judul", uid: "title" }, { name: "Judul", uid: "title" },
{ name: "Kategori", uid: "articleCategory" }, { name: "Kategori", uid: "categoryName" },
{ name: "Tanggal Unggah", uid: "createdDate" }, { name: "Tanggal Unggah", uid: "createdAt" },
{ name: "Kreator", uid: "creator" }, { name: "Kreator", uid: "createdByName" },
{ name: "Sumber", uid: "source" }, // { name: "Sumber", uid: "source" },
// { name: "Users", uid: "users" }, // { name: "Users", uid: "users" },
// { name: "Status", uid: "status" }, // { name: "Status", uid: "status" },
{ name: "Aksi", uid: "actions" }, { name: "Aksi", uid: "actions" },

14
package-lock.json generated
View File

@ -56,7 +56,7 @@
"tailwind-variants": "^0.1.18", "tailwind-variants": "^0.1.18",
"tailwindcss": "3.3.5", "tailwindcss": "3.3.5",
"typescript": "5.0.4", "typescript": "5.0.4",
"zod": "^1.11.17" "zod": "^3.23.8"
} }
}, },
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
@ -3360,12 +3360,6 @@
"url": "https://github.com/sponsors/kossnocorp" "url": "https://github.com/sponsors/kossnocorp"
} }
}, },
"node_modules/dayjs": {
"version": "1.11.10",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==",
"peer": true
},
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.4", "version": "4.3.4",
"license": "MIT", "license": "MIT",
@ -6860,9 +6854,9 @@
} }
}, },
"node_modules/zod": { "node_modules/zod": {
"version": "3.22.4", "version": "3.23.8",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
"integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
"funding": { "funding": {
"url": "https://github.com/sponsors/colinhacks" "url": "https://github.com/sponsors/colinhacks"
} }

View File

@ -57,6 +57,6 @@
"tailwind-variants": "^0.1.18", "tailwind-variants": "^0.1.18",
"tailwindcss": "3.3.5", "tailwindcss": "3.3.5",
"typescript": "5.0.4", "typescript": "5.0.4",
"zod": "^1.11.17" "zod": "^3.23.8"
} }
} }

View File

@ -1,70 +0,0 @@
import axiosDisestagesInstance2 from "./axios-disestages-instance-2";
export async function httpPostDisestages(pathUrl: any, headers: any, data?: any) {
const response = await axiosDisestagesInstance2
.post(pathUrl, data, { headers })
.catch(function (error) {
console.log(error);
return error.response;
});
console.log("Response base svc : ", response);
if (response?.status == 200 || response?.status == 201) {
return {
error: false,
message: "success",
data: response?.data,
};
} else {
return {
error: true,
message: response?.data?.message || response?.data || null,
data: null,
};
}
}
export async function httpGetDisestages(pathUrl: any, headers: any) {
const response = await axiosDisestagesInstance2
.get(pathUrl, { headers })
.catch(function (error) {
console.log(error);
return error.response;
});
console.log("Response base svc : ", response);
if (response?.status == 200 || response?.status == 201) {
return {
error: false,
message: "success",
data: response?.data,
};
} else {
return {
error: true,
message: response?.data?.message || response?.data || null,
data: null,
};
}
}
// export async function httpDelete(pathUrl: any) {
// const response = await axiosDisestagesInstance
// .delete(pathUrl, data, { headers })
// .catch(function (error) {
// console.log(error);
// return error.response;
// });
// console.log("Response base svc : ", response);
// if (response?.status == 200 || response?.status == 201) {
// return {
// error: false,
// message: "success",
// data: response?.data,
// };
// } else {
// return {
// error: true,
// message: response?.data?.message || response?.data || null,
// data: null,
// };
// }
// }