Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into prod
This commit is contained in:
commit
9d028b54d3
|
|
@ -214,7 +214,8 @@ export default function FormAudioUpdate() {
|
|||
const [tempFile, setTempFile] = useState<TempFileItem[]>([]);
|
||||
|
||||
let fileTypeId = "4";
|
||||
const isDetailOfRegionShowed = false;
|
||||
// const isDetailOfRegionShowed = false;
|
||||
const [isDetailOfRegionShowed, setIsDetailOfRegionShowed] = useState(false);
|
||||
|
||||
const { getRootProps, getInputProps } = useDropzone({
|
||||
onDrop: (acceptedFiles) => {
|
||||
|
|
@ -517,6 +518,7 @@ export default function FormAudioUpdate() {
|
|||
// Jika wilayah dicentang, auto centang POLDA, SATKER
|
||||
if (key === "wilayah") {
|
||||
currentSelection.wilayah = value;
|
||||
setIsDetailOfRegionShowed(value);
|
||||
|
||||
if (value) {
|
||||
// Ketika wilayah dicentang, auto centang POLDA, SATKER
|
||||
|
|
|
|||
|
|
@ -148,7 +148,10 @@ export default function FormImageUpdate() {
|
|||
let counterUpdateProgress = 0;
|
||||
const [progressList, setProgressList] = useState<any>([]);
|
||||
let uploadPersen = 0;
|
||||
const isDetailOfRegionShowed = false;
|
||||
|
||||
// const isDetailOfRegionShowed = false;
|
||||
const [isDetailOfRegionShowed, setIsDetailOfRegionShowed] = useState(false);
|
||||
|
||||
const [isStartUpload, setIsStartUpload] = useState(false);
|
||||
const [counterProgress, setCounterProgress] = useState(0);
|
||||
const t = useTranslations("Form");
|
||||
|
|
@ -422,6 +425,8 @@ export default function FormImageUpdate() {
|
|||
// Jika wilayah dicentang, auto centang POLDA, SATKER
|
||||
if (key === "wilayah") {
|
||||
currentSelection.wilayah = value;
|
||||
setIsDetailOfRegionShowed(value);
|
||||
|
||||
|
||||
if (value) {
|
||||
// Ketika wilayah dicentang, auto centang POLDA, SATKER
|
||||
|
|
@ -1729,7 +1734,7 @@ export default function FormImageUpdate() {
|
|||
sourceLang: "ID",
|
||||
targetLang: "EN",
|
||||
});
|
||||
console.log("PPP", res)
|
||||
console.log("PPP", res);
|
||||
|
||||
if (!res.error) {
|
||||
const resultText =
|
||||
|
|
|
|||
|
|
@ -208,7 +208,8 @@ export default function FormTeksUpdate() {
|
|||
const [translatedTitle, setTranslatedTitle] = useState("");
|
||||
|
||||
let fileTypeId = "3";
|
||||
const isDetailOfRegionShowed = false;
|
||||
// const isDetailOfRegionShowed = false;
|
||||
const [isDetailOfRegionShowed, setIsDetailOfRegionShowed] = useState(false);
|
||||
|
||||
const { getRootProps, getInputProps } = useDropzone({
|
||||
onDrop: (acceptedFiles) => {
|
||||
|
|
@ -543,6 +544,7 @@ export default function FormTeksUpdate() {
|
|||
// Jika wilayah dicentang, auto centang POLDA, SATKER
|
||||
if (key === "wilayah") {
|
||||
currentSelection.wilayah = value;
|
||||
setIsDetailOfRegionShowed(value);
|
||||
|
||||
if (value) {
|
||||
// Ketika wilayah dicentang, auto centang POLDA, SATKER
|
||||
|
|
|
|||
|
|
@ -165,7 +165,10 @@ export default function FormVideoUpdate() {
|
|||
type VideoSchema = z.infer<typeof videoSchema>;
|
||||
let progressInfo: any = [];
|
||||
let counterUpdateProgress = 0;
|
||||
const isDetailOfRegionShowed = false;
|
||||
|
||||
// const isDetailOfRegionShowed = false;
|
||||
const [isDetailOfRegionShowed, setIsDetailOfRegionShowed] = useState(false);
|
||||
|
||||
const [progressList, setProgressList] = useState<any>([]);
|
||||
let uploadPersen = 0;
|
||||
const [isStartUpload, setIsStartUpload] = useState(false);
|
||||
|
|
@ -625,6 +628,7 @@ export default function FormVideoUpdate() {
|
|||
if (key === "wilayah" && value) {
|
||||
newSelection.polda = true;
|
||||
newSelection.satker = true;
|
||||
setIsDetailOfRegionShowed(value);
|
||||
|
||||
// Update fileCheckedLevels for wilayah
|
||||
setFileCheckedLevels((prevLevels) => {
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ const DetailImage = (data: any) => {
|
|||
|
||||
if (isDownloadAll) {
|
||||
const baseId = slug.split("-")?.[0];
|
||||
const url = `${process.env.NEXT_PUBLIC_API}/media/file/download-zip?id=${baseId}&resolution=${imageSizeSelected}`;
|
||||
const url = `${process.env.NEXT_PUBLIC_API}/media/file/download-zip?id=${baseId}&resolution=${imageSizeSelected.toLowerCase()}`;
|
||||
downloadFile(url, "FileDownload.zip");
|
||||
} else {
|
||||
const selectedFile = detailDataImage?.files?.[selectedImage];
|
||||
|
|
@ -351,7 +351,7 @@ const DetailImage = (data: any) => {
|
|||
main?.names || detailDataImage?.title || "image"
|
||||
);
|
||||
} else {
|
||||
const url = `${process.env.NEXT_PUBLIC_API}/media/view?id=${selectedFile.id}&operation=file&type=image&resolution=${imageSizeSelected}`;
|
||||
const url = `${process.env.NEXT_PUBLIC_API}/media/view?id=${selectedFile.id}&operation=file&type=image&resolution=${imageSizeSelected.toLowerCase()}`;
|
||||
// ambil file sesuai yang dipilih, nama tetap dari judul (main.names)
|
||||
downloadFile(url, main?.names || detailDataImage?.title || "image");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue